Skip to content

Include invalid status code when raising handshake error #59

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

micahlee
Copy link

@micahlee micahlee commented Mar 7, 2025

The desired outcome of this PR is to include the actual failed status code when the InvalidStatusCode error is raised during the websocket handshake. We've encountered several instances where websocket connections fail during the handshake with :invalid_status_code. However, when server logs are unavailable, it can be difficult to determine what the actual problem is to resolve it.

In this PR, I've updated the error class to include the invalid status code as a member variable so that we can inspect the status code when handling this exception in our application.

Please let me know if this is a change you are amenable to, and if you have any guidance or suggestions for how to improve the PR itself.

Thanks!

@micahlee micahlee force-pushed the include-status-in-exception branch from 8565e06 to 6acbae5 Compare March 7, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant