Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_users() crashes #153

Open
knaperek opened this issue Jan 2, 2024 · 1 comment
Open

get_users() crashes #153

knaperek opened this issue Jan 2, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@knaperek
Copy link
Contributor

knaperek commented Jan 2, 2024

Describe the bug
get_users() crashes with

FireblocksApiException: Got an error from fireblocks server: { "message": "ok", "code": 0}

To Reproduce
Steps to reproduce the behavior:

  1. initialize the SDK
  2. call .get_users()

Expected behavior
Should return the list of users.

Versions (please complete the following information):

  • Python Version: [3.8, 3.9]
  • fireblocks-sdk version: [1.23.0, 2.2.1]
@knaperek knaperek added the bug Something isn't working label Jan 2, 2024
@knaperek
Copy link
Contributor Author

Alright, I've partially figured this out. At least the SDK part.

The exception was being thrown because the server responded with 403. Unfortunately, the FireblocksApiException did not show nor preserve this original error in any way so it was very unclear what happened.

Looking at the response processing and FireblocksApiException exception, I'm proposing a fix and a minor refactoring to help with such issues in the future, in this pull request: PR#159

What remains a mystery (and probably a server-side bug) is why the json message says "ok" even though on the HTTP level an error is indicated (403).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants