Skip to content

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