Skip to content

Commit

Permalink
Downgrade error to a warning
Browse files Browse the repository at this point in the history
Turns out this isn't fixable in next-syndication-api without a complete
rewrite of a bunch of middleware. I'm going to leave this guard in place
but downgrade the log to a warning instead of an error - in the case of
next-syndication they're sending correct error codes and headers etc.
  • Loading branch information
rowanmanning committed Dec 14, 2022
1 parent 3738310 commit 5e19b35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/instrument-listen.js
Expand Up @@ -85,7 +85,7 @@ module.exports = class InstrumentListen {
//
// This ensures that the app doesn't crash with `ERR_STREAM_WRITE_AFTER_END`
if (res.headersSent) {
nLogger.error({
nLogger.warn({
event: 'EXPRESS_ERROR_HANDLER_FAILURE',
message: 'The default n-express error handler could not output because the response has already been sent',
error: serializeError(err),
Expand Down

0 comments on commit 5e19b35

Please sign in to comment.