From e096f7ff6bd7f8a9d48f69eae120f53d3efd2889 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 13 Oct 2023 12:18:17 +0300 Subject: [PATCH] :art: clarify LedgerError message: if TAA is not accepted it may also lead to read-only mode Signed-off-by: ff137 --- aries_cloudagent/ledger/base.py | 6 ++++-- aries_cloudagent/ledger/indy.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/aries_cloudagent/ledger/base.py b/aries_cloudagent/ledger/base.py index 8d39aa0a23..f261147a1a 100644 --- a/aries_cloudagent/ledger/base.py +++ b/aries_cloudagent/ledger/base.py @@ -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: @@ -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( diff --git a/aries_cloudagent/ledger/indy.py b/aries_cloudagent/ledger/indy.py index e21178f01f..436923951f 100644 --- a/aries_cloudagent/ledger/indy.py +++ b/aries_cloudagent/ledger/indy.py @@ -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) @@ -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()