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

AIOHTTP websocket messages of type "ERROR" not handled correctly #3634

Closed
DoctorJohn opened this issue Sep 18, 2024 · 1 comment
Closed

AIOHTTP websocket messages of type "ERROR" not handled correctly #3634

DoctorJohn opened this issue Sep 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@DoctorJohn
Copy link
Member

DoctorJohn commented Sep 18, 2024

Describe the Bug

Both our AIOHTTP implementations of the WS subprotocols currently don't handle AIOHTTP WS messages of type "ERROR" correctly:

  • Our implementation of the legacy WS subprotocol ignores messages of type ERROR (ref)
  • Our implementation of the newer WS subprotocol complains that it's not a TEXT message and closes the connection (ref)

Instead, both implementations should return an error to the client and close the connection.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@DoctorJohn DoctorJohn added the bug Something isn't working label Sep 18, 2024
@DoctorJohn DoctorJohn self-assigned this Sep 18, 2024
@DoctorJohn DoctorJohn changed the title We currently don't handle AIOHTTP websocket messages of type "ERROR" AIOHTTP websocket messages of type "ERROR" not handled correctly Sep 18, 2024
@DoctorJohn
Copy link
Member Author

Merging #3638 already solved this issue.

AIOHTTP closes the WebSocket internally with code 1006 (Abnormal Closure) before yielding a message of type "ERROR." Our WebSocket integration code recognizes that the WebSocket has been closed and gracefully stops. Before said PR was merged, our AIOHTTP integration would try to close the WebSocket again because a non-text message (i.e., the message of type "ERROR") was received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant