-
Notifications
You must be signed in to change notification settings - Fork 41
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
Error not thrown properly by node-bitstamp #18
Comments
Yup the typo slipped, I have merged your PR and released 2.0.1 |
@krystianity I have upgraded to v2.0.1 but it doesn't fix the above error. Can you check pls? Can be easily reproduced by generating "insufficient balance". |
@krystianity can you pls update on this issue? |
@adityamertua looks like you are simply (maybe) not catching the rejected promise. Can you show your code that calls this? You should have a |
@nicolasgarnier Btw this error started only after the changes done that created typo error. Prior to that i was getting insufficient balance exception. However below is the code and the output if i catch the error:
If you notice that the issue that i reported above returns the error as an object i.e.
Then i get the above catched error as below: |
@krystianity @nicolasgarnier any update? |
I think you are facing this: https://stackoverflow.com/questions/18391212/is-it-not-possible-to-stringify-an-error-using-json-stringify Using the original code, can you try changing your code with following: .catch((err)=>{
logger.info(`ERROR: ${JSON.stringify(err.message)}`);
} and: .catch((err)=>{
logger.info('ERROR:', err.message);
} and (usually how I do it): .catch((err)=>{
logger.info('ERROR:', err);
} |
@adityamertia those rejects are new to the client, as I didnt want them in the first place, but the community wanted them; they have been merged in the last releases. The way you are handling the errors is strange, when going for await you should try/catch and not promise catch. I will reply to the empty error on the other issue. |
@nicolasgarnier I tried all logger.info modifications mentioned by you but the issue persists. I still feel it has to do with the latest changes.
output:
The error above is to be thrown because size=10 which (in my case) should create insufficient balance. |
@krystianity @nicolasgarnier Any leads on this issue? |
@krystianity @nicolasgarnier following up on this. Did u get a chance to look into this? |
Hi, same problem here, trying to set an order less than 5 dollars I get: (node:15072) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property '0'...... Anybody found a workaround or a solution? |
@sonic1k I think it has something to do with the changes done a month back. I am also waiting for a resolution on the same. |
Could not get error message
|
Should be fixed in 2.2.0 |
Hi,
This seems to be a regression from the latest changes done 2 days back. Kindly confirm. I am getting following errors if there is insufficient balance.
@krystianity @nicolasgarnier kindly confirm.
The text was updated successfully, but these errors were encountered: