From e949b02e8d99f364c48275dd20e710f0ea4077ec Mon Sep 17 00:00:00 2001 From: Lucas O'Neil Date: Tue, 25 Jun 2024 16:26:47 -0700 Subject: [PATCH] Allow no connection record, prevent unhandled exception (#3068) Signed-off-by: Lucas ONeil --- .../v2_0/handlers/pres_problem_report_handler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aries_cloudagent/protocols/present_proof/v2_0/handlers/pres_problem_report_handler.py b/aries_cloudagent/protocols/present_proof/v2_0/handlers/pres_problem_report_handler.py index 32c5e23e0a..7e9a6a82ab 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/handlers/pres_problem_report_handler.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/handlers/pres_problem_report_handler.py @@ -29,7 +29,11 @@ async def handle(self, context: RequestContext, responder: BaseResponder): try: await pres_manager.receive_problem_report( context.message, - context.connection_record.connection_id, + ( + context.connection_record.connection_id + if context.connection_record is not None + else None + ), ) except (StorageError, StorageNotFoundError): self._logger.exception(