Skip to content

Commit 2351c6d

Browse files
committed
Refactor slightly to not only
* log message with stacktrace but also * raise it
1 parent 1716f80 commit 2351c6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aries_cloudcontroller/controllers/issuer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,13 @@ async def issue_credential(self, cred_ex_id, comment, attributes):
136136
f"{self.base_url}/records/{cred_ex_id}/issue", json_data=body
137137
)
138138
except Exception as e:
139-
logger.warn(f"Could not issue credentials: {e!r}")
139+
exc_msg = f"Could not issue credentials: {e!r}"
140+
logger.warn(exc_msg)
140141
ProofController = ProofController(self.admin_url, self.client_session)
141142
ProofController.send_problem_report(
142143
pres_ex_id=self.pres_ex_id, explanation=f"{e!r}"
143144
)
145+
raise e(exc_msg)
144146

145147
# Store a received credential
146148
async def store_credential(self, cred_ex_id, credential_id):

0 commit comments

Comments
 (0)