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

Ensure all Publisher errors are handled consistently in SSE handlers #1080

Closed
rstoyanchev opened this issue Oct 18, 2024 · 0 comments
Closed
Assignees
Labels
type: bug A general bug
Milestone

Comments

@rstoyanchev
Copy link
Contributor

The review of error handling under #1067 uncovered an inconsistency in error handling. If the exception coming from the Publisherside is a SubscriptionPublisherException, it is written as a GraphQL spec map with an "error" section, followed by a "complete" message. This help the client understand the stream was ended intentionally and to provide a reason. For any other error, however, we simply close the SSE stream without writing anything.

In most cases we do expect SubscriptionPublisherException as a result of an annotated exception handler or a SubscriptionExceptionResolver have resolved it to GraphQL errors. However, in the unlikely event that it wasn't resolved at all, we still need to create a default GraphQL error, and write that before sending "complete".

@rstoyanchev rstoyanchev added the type: bug A general bug label Oct 18, 2024
@rstoyanchev rstoyanchev added this to the 1.3.3 milestone Oct 18, 2024
@rstoyanchev rstoyanchev self-assigned this Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant