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

No way to send custom error from on_connect when using GraphQLTransportWSHandler #1122

Open
vlaci opened this issue Sep 26, 2023 · 0 comments
Labels

Comments

@vlaci
Copy link

vlaci commented Sep 26, 2023

When using the 'legacy' handler, I can send custom errors from on_connect as documented, because of the special Handling of WebSocketConnectionError at

if isinstance(error, WebSocketConnectionError):
payload = error.payload # pylint: disable=no-member

The same special handling is missing from GraphQLTransportWSHandler

except Exception as error:
log_error(error, self.logger)
await websocket.close()

It would be nice if at least the error code could be overridden to signal authorization errors to the client.

@rafalp rafalp added the roadmap Feature that we want to have included label Jan 23, 2024
@TMuszczekk TMuszczekk added to do and removed roadmap Feature that we want to have included labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants