Skip to content

Commit

Permalink
Improve error handling verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Rebetez committed Jun 18, 2024
1 parent 72ab5c0 commit 79a840d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/picterra/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def _wait_until_operation_completes(
if status == "success":
break
if status == "failed":
raise APIError("Operation %s failed" % operation_id)
errors = resp.json()["errors"]
raise APIError("Operation %s failed: %s" % (operation_id, json.dumps(errors)))
time.sleep(poll_interval)
return resp.json()

Expand Down

0 comments on commit 79a840d

Please sign in to comment.