Skip to content

Commit

Permalink
Do not raise to handle temporal duplicate RECORD_TYPE_DID_DOC
Browse files Browse the repository at this point in the history
  • Loading branch information
baegjae committed Feb 20, 2024
1 parent a668704 commit 53f567c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion aries_cloudagent/storage/askar.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Aries-Askar implementation of BaseStorage interface."""
import logging

from typing import Mapping, Sequence

Expand All @@ -21,6 +22,8 @@
)
from .record import StorageRecord

LOGGER = logging.getLogger(__name__)


class AskarStorage(BaseStorage):
"""Aries-Askar Non-Secrets interface."""
Expand Down Expand Up @@ -164,7 +167,9 @@ async def find_record(
except AskarError as err:
raise StorageError("Error when finding storage record") from err
if len(results) > 1:
raise StorageDuplicateError("Duplicate records found")
# SKT: Do not raise to handle temporal duplicate RECORD_TYPE_DID_DOC (will be removed by logic)
LOGGER.error("Duplicate records found - Use first record - type_filter: %s", type_filter)
# raise StorageDuplicateError("Duplicate records found")
if not results:
raise StorageNotFoundError("Record not found")
row = results[0]
Expand Down

0 comments on commit 53f567c

Please sign in to comment.