Skip to content

Commit

Permalink
Merge pull request #2545 from ff137/art/improve-ledger-error-message
Browse files Browse the repository at this point in the history
🎨 clarify LedgerError message when TAA is required and not accepted
  • Loading branch information
swcurran authored Oct 13, 2023
2 parents 760e9bf + e096f7f commit 4c8f64a
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 4c8f64a

Please sign in to comment.