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

Log Errors Before Returning #3260

Closed
ThisaruGuruge opened this issue Aug 16, 2022 · 1 comment · Fixed by ballerina-platform/module-ballerina-graphql#876
Closed

Log Errors Before Returning #3260

ThisaruGuruge opened this issue Aug 16, 2022 · 1 comment · Fixed by ballerina-platform/module-ballerina-graphql#876
Assignees
Labels
module/graphql Issues related to Ballerina GraphQL module Team/PCM Protocol connector packages related issues Type/Improvement

Comments

@ThisaruGuruge
Copy link
Member

Description:
Currently, when a GraphQL resource returns an error, it does not log the error. Users have to manually log the error when an error occurred.

To make the GraphQL library consistent with the other standard library, the errors should be logged before returning. Additionally, there should be an option to disable the logging.

@ThisaruGuruge ThisaruGuruge added Type/Improvement module/graphql Issues related to Ballerina GraphQL module Team/PCM Protocol connector packages related issues labels Aug 16, 2022
@ThisaruGuruge ThisaruGuruge self-assigned this Aug 16, 2022
@ThisaruGuruge
Copy link
Member Author

ThisaruGuruge commented Aug 17, 2022

After an offline discussion, the following conclusion was made.

  • For Update 2, we are only supporting this for Query and Mutation operations. (Subscriptions not supported).
  • The log:printError() API will be used to print the error log which will consist of the following:
    • The message
    • The stacktrace

Edit: Removed the error from the log since it duplicates the message

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 Team/PCM Protocol connector packages related issues Type/Improvement
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant