Skip to content

Commit

Permalink
fix: don't mask backend errors
Browse files Browse the repository at this point in the history
The backend should always write compliant response codes.
This change removes a work around for the case where it failed to
correctly set 202
  • Loading branch information
Robin Bryce committed Dec 11, 2024
1 parent 3b40eed commit 38d38c6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions datatrails_scitt_samples/statement_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ def get_operation_status(ctx: ServiceContext, operation_id: str) -> dict:
response.raise_for_status()
if response.status_code == 202:
return {"Status": "running"}
if not response.content:
ctx.info(f"no content and status code {response.status_code} != 202, assuming running")
return {"Status": "running"}
return decode_cbor_data(response.content)


Expand Down

0 comments on commit 38d38c6

Please sign in to comment.