We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Should be able to just pass an Error object and automatically fetch the error message from the Error object.
Error
For example:
return next(new errors.BadRequestError(error));
Instead of (currently):
return next(new errors.BadRequestError(error.message));
The text was updated successfully, but these errors were encountered:
Once 5.x lands this will become the default behavior, as all errors created by restify-errors inherit from VError.
Sorry, something went wrong.
Great, any idea when 5.x will land?
5.x
Oops - really sorry for not following up on this thread. I may have been confused, and thought you were asking about restify 4.x.
Are you basically wanting to create a new error, re-using only the error message itself but without creating a cause chain?
No branches or pull requests
Should be able to just pass an
Error
object and automatically fetch the error message from theError
object.For example:
Instead of (currently):
The text was updated successfully, but these errors were encountered: