Skip to content

Commit

Permalink
🎨 clarify LedgerError message: if TAA is not accepted it may also lea…
Browse files Browse the repository at this point in the history
…d to read-only mode

Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed Oct 13, 2023
1 parent 760e9bf commit e096f7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions aries_cloudagent/ledger/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ async def create_and_send_schema(
else:
if await self.is_ledger_read_only():
raise LedgerError(
"Error cannot write schema when ledger is in read only mode"
"Error cannot write schema when ledger is in read only mode, "
"or TAA is required and not accepted"
)

try:
Expand Down Expand Up @@ -497,7 +498,8 @@ async def create_and_send_credential_definition(

if await self.is_ledger_read_only():
raise LedgerError(
"Error cannot write cred def when ledger is in read only mode"
"Error cannot write cred def when ledger is in read only mode, "
"or TAA is required and not accepted"
)

cred_def_req = await self._create_credential_definition_request(
Expand Down
6 changes: 4 additions & 2 deletions aries_cloudagent/ledger/indy.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ async def update_endpoint_for_did(
if exist_endpoint_of_type != endpoint:
if await self.is_ledger_read_only():
raise LedgerError(
"Error cannot update endpoint when ledger is in read only mode"
"Error cannot update endpoint when ledger is in read only mode, "
"or TAA is required and not accepted"
)

nym = self.did_to_nym(did)
Expand Down Expand Up @@ -817,7 +818,8 @@ async def register_nym(
"""
if await self.is_ledger_read_only():
raise LedgerError(
"Error cannot register nym when ledger is in read only mode"
"Error cannot register nym when ledger is in read only mode, "
"or TAA is required and not accepted"
)

public_info = await self.get_wallet_public_did()
Expand Down

0 comments on commit e096f7f

Please sign in to comment.