From 962f5e93b530d8315a00febd3b3a15480bfe4477 Mon Sep 17 00:00:00 2001 From: Jason Syrotuck Date: Thu, 7 Nov 2024 08:36:03 -0800 Subject: [PATCH] better logging --- services/core-api/app/api/services/traction_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/core-api/app/api/services/traction_service.py b/services/core-api/app/api/services/traction_service.py index 2b2077fa8e..185b13c9a7 100644 --- a/services/core-api/app/api/services/traction_service.py +++ b/services/core-api/app/api/services/traction_service.py @@ -204,7 +204,11 @@ def sign_add_data_integrity_proof(self, verificationMethod: str, credential: Bas post_resp = requests.post( traction_vc_di_add_proof, json=payload, headers=self.get_headers()) - return post_resp.json() + if post_resp.ok: + return post_resp.json() + else: + raise VerificableCredentialWorkflowError( + f"Error while adding data integrity signature, {post_resp.text}") def fetch_a_random_did_key(self): get_resp = requests.get(