Receiving on a disconnected websocket emits an incorrect error message #2961
Unanswered
bryzhang
asked this question in
Potential Issue
Replies: 1 comment 5 replies
-
Can you provide a minimal reproducible example? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm messaging on behalf of Baseten. We've noticed that when we call "receive" on a disconnected websocket, we get an incorrect error message,
'WebSocket is not connected. Need to call "accept" first.'
. Instead, it would be helpful to return a clearer message for a disconnected websocket, like,WebSocket is already disconnected. Cannot receive.
I've attached a patch that essentially makes this change (since I had some trouble pushing to create a PR):
0001-emit-clearer-error-message-when-receiving-on-a-disco.patch
Beta Was this translation helpful? Give feedback.
All reactions