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
Sending .close(status=4000) results in an error #639
Comments
@elderlabs I think I understand what you're getting at, but let me try to summarize with my own words to confirm. websocket-client allows I can add an additional |
Thank you for your reply. Some time ago, we learned how to suppress the error once it reached Sentry's logging mechanism before dispatching the error to their API. If it were up to me, Thank you for your time and consideration. |
I am glad the issue was resolved in Sentry, but I still thought I would add this minor edit as a small improvement |
Considering I can now remove the suppressor we hard-coded into the Sentry-logging function on our end, this is a welcome change. Sorry if I didn't clarify that in my original reply. Thank you! |
I maintain a library to interface with Discord's API. Some time ago, they made a change to help balance out connections in their auto-scaling hardware in-use. The issue: they require you send a status code in your WS closure in order to specify whether you're reconnecting or disconnecting -- as their API sends reconnect OPCodes at intervals. When specifying the status code to send back after the OPCode, websocket_client logs the closure as an error, thus triggering Sentry, our error logger/notification dispatcher.
The questions here is whether there's some way to silence this error, because it's not an error. Everything's working as intended on our end, thus the status code shouldn't trigger an error at all. Perhaps a logging flag to go with the close to specify whether it should log as an error, or log as info, but for compatibility's sake default to logging as an error as that's the current behavior.
I noticed something mentioned in #414, but it didn't seem to really touch on the issue.
The text was updated successfully, but these errors were encountered: