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
Idea:
Add an option to extend a internal global error handler and response envelope wrapper.
This basically wraps the response into a wrapper and automatically takes care of the error and how's it wrapped into json.
Like wise for success responses too.
The text was updated successfully, but these errors were encountered:
` app.use(function(err,req,res,next){ if(err.name=='UnauthorizedError') { return res.status(401).send({status:'error',msg:'Authentication failed'}); } else{ return res.status(500).send({status:'error',msg:'Internal Server Error'}); }
})`
Sorry, something went wrong.
Don''t worry i'm working on same. A package named exhancer you can check here... https://github.com/kisshan13/exhancer.js
No branches or pull requests
Idea:
Add an option to extend a internal global error handler and response envelope wrapper.
This basically wraps the response into a wrapper and automatically takes care of the error and how's it wrapped into json.
Like wise for success responses too.
The text was updated successfully, but these errors were encountered: