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
fix: handle invalid url #3128
fix: handle invalid url #3128
Conversation
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.
lgtm
lib/fourOhFour.js
Outdated
const body = `{"error":"Not Found","message":"${message}","statusCode":404}` | ||
|
||
// simulate normal route logging | ||
const id = genReqId(req) |
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.
I would like to have some feedback about the logging. Do we have a better approach for this one?
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.
Looks good to me.
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.
lgtm
* fix: handle invalid url (#3128) * fix: handle invalid url * refactor: handle as 404 instead of 400 * fix: respect disableRequestLogging * chore: linting * feat: allow to customize 404 onBadUrl handler
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes: #3127
Checklist
npm run test
andnpm run benchmark
and the Code of conduct