alpaca-trade-api icon indicating copy to clipboard operation
alpaca-trade-api copied to clipboard

Raise 400 responses as an InvalidRequest

Open benterova opened this issue 8 months ago • 0 comments

If there is a malformed request, in my case it was passing an array of strings for the "symbols" parameter, the client will return an Order with all nil parameters, instead of rightfully raising an error when it wasn't fulfilled.

This adds checking for 400 errors in various places within the client and raises an InvalidRequest with the error message.

benterova avatar Jun 10 '24 16:06 benterova