Skip to content

Commit

Permalink
reformating for passing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yias committed Oct 9, 2024
1 parent 267a3b0 commit c318df7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ansys/simai/core/utils/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ def handle_http_errors(response: requests.Response) -> None:
if response.status_code == 404:
raise NotFoundError(f"{message}", response) from e
else:
error_message = f"{response.status_code} {message}"
if resolution := json_response.get("resolution", ""):
error_message += f"\n{resolution}"
raise ApiClientError(
f"{response.status_code} {message}.\n{json_response.get('resolution', '')}",
error_message,
response,
) from e
else:
Expand Down

0 comments on commit c318df7

Please sign in to comment.