-
Notifications
You must be signed in to change notification settings - Fork 2.8k
log when request body parsing fails (fix #2555) #2556
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
Conversation
|
Beep boop! 🤖 Hey @ecthiender, thanks for your PR! One of my human friends will review this PR and get back to you as soon as possible. 🕐 Stay awesome! 😎 |
|
Deploy preview for hasura-docs ready! Built with commit 63bd7f8 |
|
Review app for commit 0ec99cf deployed to Heroku: https://hge-ci-pull-2556.herokuapp.com |
- fix a bug in websocket-log
|
As per @rakeshkky , refactored some logging code at the server module. Need to verify if it breaks any existing logging. |
|
Review app for commit 967a141 deployed to Heroku: https://hge-ci-pull-2556.herokuapp.com |
- tidy logging in jwk-refresh-log
- fix a minor bug in refreshing JWK:
the JWK refreshed 10 seconds before the actual expiry (assuming the
expiry time will always be larger than 10 seconds). Fix that.
|
Review app for commit 1ccfdca deployed to Heroku: https://hge-ci-pull-2556.herokuapp.com |
rakeshkky
left a comment
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.
server LGTM
|
Review app for commit b9812a1 deployed to Heroku: https://hge-ci-pull-2556.herokuapp.com |
|
Review app for commit 05d9ed0 deployed to Heroku: https://hge-ci-pull-2556.herokuapp.com |
lexi-lambda
left a comment
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.
These changes seem reasonable to me (though I’m not very familiar with the code and functionality in question, so it probably isn’t a super thorough review), but I do wonder: is there any way to add a test for this functionality that isn’t too difficult? It seems like logging is worth having access to in the test harness, but I don’t know if it’s set up for that right now.
|
Review app for commit 657c025 deployed to Heroku: https://hge-ci-pull-2556.herokuapp.com |
@lexi-lambda there are tests for logging. Let me see if I can add tests for this quickly. |
|
Review app for commit ab555de deployed to Heroku: https://hge-ci-pull-2556.herokuapp.com |
…phql-engine into fix-2555-log-parse-failed
|
Review app for commit 63bd7f8 deployed to Heroku: https://hge-ci-pull-2556.herokuapp.com |
rakeshkky
left a comment
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.
server test LGTM
|
Review app https://hge-ci-pull-2556.herokuapp.com is deleted |
Description
Regression: since
beta.3whenever request body parsing failed, the error was not logged. This PR fixes the bug.Affected components
Related Issues
#2555
Solution and Design
Simple fix. The
parseBodyfunction was previously part of the handler functions. Sincebeta.3it has been moved tomkSpockAction, but the result of it was handled byqErrToRespinstead oflogAndThrowfunction.Edit: After review from @rakeshkky , refactored
mkSpockActionto have separate functions for [logging error and returning the response] and [logging success and returning the response]. Removed specific functions which only returned response (which was the source of the bug).Notes to reviewer
Simple one line fix inHasura.Server.AppmoduleSteps to test and verify
/v1/graphqlor/v1/querywith wrong JSON structure.Limitations, known bugs & workarounds