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
in config/express.js :
else if (!(err instanceof APIError)) { const apiError = new APIError(err.message, err.status, err.isPublic); return next(apiError); }
is supposed to catch errors that aren't instanceof APIError and convert them, but this always return false : example :
const err = new APIError('Not found', 404, true); console.log(err instanceof APIError) // false console.log(err instanceof Error) // true
The text was updated successfully, but these errors were encountered:
Which version of the boilerplate are you using?
Sorry, something went wrong.
version 1.0.0
I guess that's because of Babel.
You may need to use babel-plugin-transform-builtin-extend to make instanceof works as expected in Babel environment.
babel-plugin-transform-builtin-extend
instanceof
Take a look of this.
I'll take a look at it ! thank you @kitce
No branches or pull requests
in config/express.js :
is supposed to catch errors that aren't instanceof APIError and convert them, but this always return false :
example :
The text was updated successfully, but these errors were encountered: