Skip to content

Commit

Permalink
🐛 Handle failure to resolve DIDComm services in DIDXManager
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed Oct 22, 2024
1 parent 1eaeeb3 commit 121e8a8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions acapy_agent/protocols/didexchange/v1_0/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
from did_peer_4 import LONG_PATTERN, long_to_short

from ....admin.server import AdminResponder
from ....connections.base_manager import BaseConnectionManager
from ....connections.base_manager import (
BaseConnectionManager,
BaseConnectionManagerError,
)
from ....connections.models.conn_record import ConnRecord
from ....connections.models.connection_target import ConnectionTarget
from ....core.error import BaseError
Expand Down Expand Up @@ -371,7 +374,13 @@ async def create_request(

did_url = None
if conn_rec.their_public_did is not None:
services = await self.resolve_didcomm_services(conn_rec.their_public_did)
try:
services = await self.resolve_didcomm_services(conn_rec.their_public_did)
except BaseConnectionManagerError as e:
raise DIDXManagerError(
"Failed to resolve DIDComm services from "
f"{conn_rec.their_public_did}: {e}"
) from e
if services:
did_url = services[0].id

Expand Down

0 comments on commit 121e8a8

Please sign in to comment.