Skip to content

Commit

Permalink
Merge pull request #52 from fireblocks/add-error-code-to-exception
Browse files Browse the repository at this point in the history
add error_code to fireblocks-api-exception
  • Loading branch information
yarinvak authored Nov 24, 2021
2 parents bcd4521 + ffd4604 commit 4f5b5dd
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 46 deletions.
12 changes: 11 additions & 1 deletion fireblocks_sdk/api_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,14 @@ def __init__(self, amount, destination):
self.destination = destination.__dict__


class FireblocksApiException(Exception): pass
class FireblocksApiException(Exception):
"""Exception raised for Fireblocks sdk errors
Attributes:
message: explanation of the error
error_code: error code of the error
"""
def __init__(self, message="Fireblocks SDK error", error_code=None):
self.message = message
self.error_code = error_code
super().__init__(self.message)
Loading

0 comments on commit 4f5b5dd

Please sign in to comment.