New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Set specific status separately from the code. #3
Comments
@tracker1 i will try to get to this in the next few days or worst case this weekend. |
@tracker1 this support is committed to master. If you could please pull master and give it a spin + provide feedback that would be great. Example: errors.create({name: 'CustomHttpError', status: 488});
console.log(new errors.CustomHttpError().toJSON()); outputs
You can also override on the constructor.. e.g. new errors.MyException({status: 488}); |
published to npm as 0.2.0... closing |
Nice, thanks... :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example:
outputs:
The text was updated successfully, but these errors were encountered: