Skip to content

HTTPError should expose response.statusCode in a separate property #4

@enigmatic00

Description

@enigmatic00

I have an instance where solr-client (a consumer of node-httperror) returns an error object with the resposne from solr as well as all the other flavor in the error object.

Depending on the type request, the error from solr could be a 400 bad request, or 500 internal server error, and I would like to respond to my consumers as such, however, it is very inconvenient to have to parse the error message to be able to get to the error code when it can easily be exposed as a separate property.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions