-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
DeprecationWarning: Unhandled promise rejections are deprecated. #201
Comments
Will look into it, thanks! |
I was going to post about this ages ago but never got around to it, noticed this when I upgraded my Node version (to v6) and when I did this my bot would just randomly crash every so often, seemingly randomly. The only errors that were logged were in relation to unhandled promises, so I thought it might be those. Not sure if it was the actual issue, but it still needs fixing of course. |
Imagine this was synchronous code Without the internal client._sendCommand(...)
// This will only call if it resolves and then skip the catch to the next
// `then`, assuming `then` doesn't throw:
.then()
// It will skip the `then` if it rejects and come to here:
.catch(); With the internal client._sendCommand(...)
// This will always be called:
.then()
// This will never be called unless the previous `then` throws:
.catch(); And also the rejection message is now thrown away, so what was the point? (Unless there's something I'm missing.) |
Still open |
This is something that is going to be fixed in 2.0.0 only. As of now, as written in our readme file and documentation, the module supports Node 4.x. |
Update: Might be fixed in v1.2.2, but I need reviews for #230. |
Is this fix still coming? |
Actual behaviour:
Unhandled promise rejections are deprecated.
Fix:
client.js Line 984
Error log:
Server configuration
The text was updated successfully, but these errors were encountered: