Skip to content

Commit

Permalink
Issue #512: add more info to "403 unknown error"
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Dec 1, 2023
1 parent 0c70c53 commit 86ea71e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openeo/rest/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
rfc3339,
str_truncate,
url_join,
repr_truncate,
)

_log = logging.getLogger(__name__)
Expand Down Expand Up @@ -178,7 +179,7 @@ def _raise_api_error(self, response: requests.Response):
exception = OpenEoApiError(
http_status_code=status_code,
code=info.get("code", "unknown"),
message=info.get("message", "unknown error"),
message=info.get("message", f"unknown error ({repr_truncate(info, width=200)})"),
id=info.get("id"),
url=info.get("url"),
)
Expand Down

0 comments on commit 86ea71e

Please sign in to comment.