diff --git a/src/picterra/client.py b/src/picterra/client.py index 322a7c2..30173e4 100644 --- a/src/picterra/client.py +++ b/src/picterra/client.py @@ -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()