Skip to content

Allow stringification of StatusCodeError errors to be disabled #1

@Limess

Description

@Limess

Hello,

We have quite strict data-protection requirements regarding what can be logged to disk. When a StatusCodeError is logged, the error is currently thrown with a message which contains the whole stringified body (

this.message = statusCode + ' - ' + (JSON && JSON.stringify ? JSON.stringify(body) : body);
). This creates problems as we need to intercept this and remove it from the message.

Would it be possible to add an option to disable this behaviour (as the body is still acceptable on the error object)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bump MajorBump major version once released

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions