[Bug]: Error messages not propagated
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 397
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 6
Description
### Is there an existing issue for this?
- [X] 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
```markdown
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?
- [X] 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_
Contributor guide
Assessment
This issue has not been assessed yet.