Skip to content

Commit

Permalink
Reformat code using black
Browse files Browse the repository at this point in the history
  • Loading branch information
elkezza committed May 24, 2024
1 parent 75db2e0 commit 0b84a8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions exoscale/api/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# exceptions.py


class ExoscaleAPIException(Exception):
"""
Base exception for exoscale API errors.
Base for all other exception classes, it allows to catch all exoscale exceptions with a single except block.
"""

pass


class ExoscaleAPIClientException(ExoscaleAPIException):
"""
For client-side errors (4xx).
Shows that the client sent a bad request.
"""

pass


class ExoscaleAPIServerException(ExoscaleAPIException):
"""
For server-side errors (5xx).
Shows the server encountered an error while processing the request.
"""

pass
1 change: 0 additions & 1 deletion exoscale/api/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ def _call_operation(self, operation_id, parameters=None, body=None):
f"Server error {response.status_code}: {response.text}"
)


return response.json()


Expand Down

0 comments on commit 0b84a8e

Please sign in to comment.