-
Notifications
You must be signed in to change notification settings - Fork 767
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
throwing whenever the statusCode != 200 causes issues #57
Comments
Example
is the statusCode is different than 200, e.g. Insufficient funds or Lot size, it will just spew it, without catching it in the try/catch, or being able to reject or resolve the promise. |
Yes thank you for the suggestion, I agree and this will be fixed in Hopefully this release will come soon. Life has kept me busy recently |
Thanks for the quick response. All the best 👍 |
New release available: |
There is no way (AFAIK) to embed your API in Promises, when you simply throw the response on L.89.
try catch, or Promise rejection won't get it, and it will just throw and fail.
Recommend you remove L.89 or use Promises instead of a callback.
if ( response && response.statusCode !== 200 ) throw response;
The text was updated successfully, but these errors were encountered: