fireblocks-sdk-py
fireblocks-sdk-py copied to clipboard
Preserve original remote error attributes in API exception
What this fixes:
- wild "except" statement
- non-Pythonic direct type comparison (even worse, with "is")
- textual FB response message is parsed and preserved; this may be handy when trying to automatically propagate a meaningful textual error reason somewhere upstream in the code (e.g. operator dashboard panel)
- original HTTP status code is now preserved for easier debugging under the http_code attribute
- original requests status exception is nicely chained (with the extended raise from statement)