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

[Bug]: Error messages not propagated #337

Open
2 tasks done
alessiocastrica opened this issue Sep 15, 2023 · 0 comments · May be fixed by #338
Open
2 tasks done

[Bug]: Error messages not propagated #337

alessiocastrica opened this issue Sep 15, 2023 · 0 comments · May be fixed by #338
Assignees

Comments

@alessiocastrica
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

There are several endpoints that return additional data for an error other than the code and message that we should propagate in the SDK an example:
{"code":40310000,"day_trading_buying_power":"43251.29","max_dtbp_used":"43370.5226","max_dtbp_used_so_far":"12805.2817","message":"day trading margin call protection","open_orders":"283","symbol":"ID"}

Expected Behavior

The full response body should be mapped in case of errors too.

SDK Version I encountered this issue in

0.10.0

Steps To Reproduce

1. Sending an order without enough buying power
2. Compare the SDK output with the direct API response

Filled out the Steps to Reproduce section?

  • I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

Anything else?

No response

@alessiocastrica alessiocastrica linked a pull request Sep 20, 2023 that will close this issue
@alessiocastrica alessiocastrica self-assigned this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant