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

Add more information to unhandled incoming request logging #1143

Merged
merged 3 commits into from
Oct 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/receivers/HTTPReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ export default class HTTPReceiver implements Receiver {
} catch (error) {
const e = error as any;
if (e.code === ErrorCode.HTTPReceiverDeferredRequestError) {
this.logger.info('An unhandled request was ignored');
this.logger.info(`Unhandled HTTP request (${req.method}) made to ${req.url}`);
res.writeHead(404);
res.end();
} else {
this.logger.error('An unexpected error was encountered');
this.logger.error(`An unexpected error occurred during a request (${req.method}) made to ${req.url}`);
this.logger.debug(`Error details: ${e}`);
res.writeHead(500);
res.end();
Expand Down