fireblocks-sdk-py icon indicating copy to clipboard operation
fireblocks-sdk-py copied to clipboard

Preserve original remote error attributes in API exception

Open knaperek opened this issue 2 years ago • 0 comments

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)

knaperek avatar Jan 11 '24 16:01 knaperek