Demo on codesandbox
Request was aborted by express.text middleware because:
Request body length does not match content-length header (I know it's more like hypothetical situation, but anyway)
But there is request completed message from pino-http because res.writableEnded is true.
Maybe it is better to change condition for defaultSuccessfulRequestMessageProvider to something like this:
return !req.readableAborted && res.writableEnded ? 'request completed' : 'request aborted'
Demo on codesandbox
Request was aborted by
express.textmiddleware because:Request body length does not match content-length header(I know it's more like hypothetical situation, but anyway)But there is
request completedmessage from pino-http becauseres.writableEndedistrue.Maybe it is better to change condition for defaultSuccessfulRequestMessageProvider to something like this: