Skip to content

Message "request completed" when request not completed #308

Description

@someden

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions