-
Notifications
You must be signed in to change notification settings - Fork 74
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
Improving server exception logging by including exception in log message #471
Improving server exception logging by including exception in log message #471
Conversation
…n info too There were two problems before: 1. The error message itself was not being logged, but only a mention that there was an error; 2. It was not possible to access the possibly original exception which led to the request processing error. However, it's extremely useful to log the error with the whole exception information including the stack trace of where the exception was thrown. However, these changes also introduce a breaking change as IGQLError and GQLProblemDetails now each have an additional mandatory member holding the possible exception which generated the error. These types (especiall GQLProblemDetails) are public and could be used by code using FSharp.Data.GraphQL.
This reverts commit 46d5b76.
This reverts commit d24abb4.
… active pattern" This reverts commit b03bf40.
…exception info too" This reverts commit e829181.
…info too Note: this commit is a 2nd attempt after getting feedback from code review. There were two problems before: 1. The error message itself was not being logged, but only a mention that there was an error; 2. It was not possible to access the possibly original exception which led to the request processing error. However, it's extremely useful to log the error with the whole exception information including the stack trace of where the exception was thrown. However, these changes also introduce a breaking change as IGQLError and GQLProblemDetails now each have an additional mandatory member holding the possible exception which generated the error. These types (especiall GQLProblemDetails) are public and could be used by code using FSharp.Data.GraphQL.
@xperiandri I rewrote my changes according to your suggestion regarding the extra interface. Please kindly review the current changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one suggestion
src/FSharp.Data.GraphQL.Server.AspNetCore/Giraffe/HttpHandlers.fs
Outdated
Show resolved
Hide resolved
These changes are according to a request during code review.
@xperiandri there's a commit for applying fantomas formatting to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@valbers it is something bad on your side. I've just formatted it on my side and it is similar to what it was before your formatting.
Try restore the latest Fantomas with tool restore in this repo
@xperiandri waiting for your approving review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing 🙂
src/FSharp.Data.GraphQL.Server.AspNetCore/Giraffe/HttpHandlers.fs
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrii Chebukin <XperiAndri@Outlook.com>
Cool! Lots of thanks for the contribution! |
There were two problems before:
Before
After
However, these changes also introduce a breaking change as
GQLProblemDetails
now has an additional member holding the possible exception which generated the error.GQLProblemDetails
is public and could be in use by code using FSharp.Data.GraphQL.