Skip to content
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

Expose close status codes for WebSockets #1968

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

rubik-cube-man
Copy link
Contributor

Make WebSocket close exceptions expose the status code given by the server.

As it stands, there is no nice way to check the reason the WebSocket was closed. At the moment, in my code, I'm just checking if the message contains a String. This change would allow you to check the close status code for the WebSockets termination and handle it accordingly.

@rubik-cube-man
Copy link
Contributor Author

I pushed a fix for the formatting that caused the pipeline to fail!
I've just opened this as well: #1971 - I originally didn't have it formatted correctly because I noticed that after I ran a maven task, it was converting all my files to CRLF. After doing some research into it, I found out more about the formatter plugin, and though it'd be useful to define the line endings in the pom.

@jmartisk jmartisk merged commit 7d87fcf into smallrye:main Nov 15, 2023
5 checks passed
@jmartisk
Copy link
Member

This makes sense, thanks!

@rubik-cube-man rubik-cube-man deleted the expose-error-codes branch November 15, 2023 14:49
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.

2 participants