diff --git a/aries_cloudagent/protocols/issue_credential/v1_0/routes.py b/aries_cloudagent/protocols/issue_credential/v1_0/routes.py index e00411efed..1e08f969fd 100644 --- a/aries_cloudagent/protocols/issue_credential/v1_0/routes.py +++ b/aries_cloudagent/protocols/issue_credential/v1_0/routes.py @@ -692,13 +692,8 @@ async def credential_exchange_send_proposal(request: web.BaseRequest): if cred_ex_record: async with profile.session() as session: await cred_ex_record.save_error_state(session, reason=err.roll_up) - await report_problem( - err, - ProblemReportReason.ISSUANCE_ABANDONED.value, - web.HTTPBadRequest, - cred_ex_record or connection_record, - outbound_handler, - ) + # other party cannot yet receive a problem report about our failed protocol start + raise web.HTTPBadRequest(reason=err.roll_up) await outbound_handler( credential_proposal, @@ -903,13 +898,8 @@ async def credential_exchange_send_free_offer(request: web.BaseRequest): if cred_ex_record: async with profile.session() as session: await cred_ex_record.save_error_state(session, reason=err.roll_up) - await report_problem( - err, - ProblemReportReason.ISSUANCE_ABANDONED.value, - web.HTTPBadRequest, - cred_ex_record or connection_record, - outbound_handler, - ) + # other party cannot yet receive a problem report about our failed protocol start + raise web.HTTPBadRequest(reason=err.roll_up) await outbound_handler(credential_offer_message, connection_id=connection_id) diff --git a/aries_cloudagent/protocols/issue_credential/v2_0/routes.py b/aries_cloudagent/protocols/issue_credential/v2_0/routes.py index 721128b4ae..d1f0995624 100644 --- a/aries_cloudagent/protocols/issue_credential/v2_0/routes.py +++ b/aries_cloudagent/protocols/issue_credential/v2_0/routes.py @@ -835,13 +835,8 @@ async def credential_exchange_send_proposal(request: web.BaseRequest): if cred_ex_record: async with profile.session() as session: await cred_ex_record.save_error_state(session, reason=err.roll_up) - await report_problem( - err, - ProblemReportReason.ISSUANCE_ABANDONED.value, - web.HTTPBadRequest, - cred_ex_record or conn_record, - outbound_handler, - ) + # other party cannot yet receive a problem report about our failed protocol start + raise web.HTTPBadRequest(reason=err.roll_up) await outbound_handler(cred_proposal_message, connection_id=connection_id) @@ -1042,13 +1037,8 @@ async def credential_exchange_send_free_offer(request: web.BaseRequest): if cred_ex_record: async with profile.session() as session: await cred_ex_record.save_error_state(session, reason=err.roll_up) - await report_problem( - err, - ProblemReportReason.ISSUANCE_ABANDONED.value, - web.HTTPBadRequest, - cred_ex_record or conn_record, - outbound_handler, - ) + # other party cannot yet receive a problem report about our failed protocol start + raise web.HTTPBadRequest(reason=err.roll_up) await outbound_handler(cred_offer_message, connection_id=connection_id) @@ -1252,13 +1242,8 @@ async def credential_exchange_send_free_request(request: web.BaseRequest): if cred_ex_record: async with profile.session() as session: await cred_ex_record.save_error_state(session, reason=err.roll_up) - await report_problem( - err, - ProblemReportReason.ISSUANCE_ABANDONED.value, - web.HTTPBadRequest, - cred_ex_record, - outbound_handler, - ) + # other party cannot yet receive a problem report about our failed protocol start + raise web.HTTPBadRequest(reason=err.roll_up) await outbound_handler(cred_request_message, connection_id=connection_id)