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
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