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

Exit the Listener When Panic Occurred #4237

Closed
ThisaruGuruge opened this issue Mar 22, 2023 · 2 comments
Closed

Exit the Listener When Panic Occurred #4237

ThisaruGuruge opened this issue Mar 22, 2023 · 2 comments
Assignees
Labels
module/graphql Issues related to Ballerina GraphQL module module/nats module/rabbitmq Team/PCM Protocol connector packages related issues Type/Improvement

Comments

@ThisaruGuruge
Copy link
Member

Description:
Current GraphQL implementation handles panics similar to errors. If a panic happens in the user code, the GraphQL listener will log the error (which caused the panic) and returns it as a regular GraphQL error.

But this behavior is incorrect. Therefore, we should fix it to exit the listener when a panic occurs. Currently, there are no Runtime APIs to exit the listener. Until we have such API, using System.exit() would be the workaround.

@ThisaruGuruge ThisaruGuruge added Type/Improvement module/nats module/rabbitmq module/graphql Issues related to Ballerina GraphQL module Team/PCM Protocol connector packages related issues labels Mar 22, 2023
@ThisaruGuruge ThisaruGuruge moved this from BackLog to Planned for Sprint in Ballerina Team Main Board Mar 22, 2023
@ThisaruGuruge
Copy link
Member Author

Related: #4229

@ThisaruGuruge
Copy link
Member Author

Closing this as it is completed now.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Ballerina Team Main Board Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/graphql Issues related to Ballerina GraphQL module module/nats module/rabbitmq Team/PCM Protocol connector packages related issues Type/Improvement
Projects
Archived in project
Development

No branches or pull requests

3 participants