-
Notifications
You must be signed in to change notification settings - Fork 17
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
chore(error-middleware): allow err.message and err.status values to be used #43
base: master
Are you sure you want to change the base?
chore(error-middleware): allow err.message and err.status values to be used #43
Conversation
abernier
commented
Sep 19, 2022
•
edited
Loading
edited
ironlauncher with an `n`
… into a utils folder. issue 2: change globally defined �]2;��]1;� variable onto so as not create conflicts with any �]2;��]1;� variable coming from routes. issue 3: rename routes files to add onto file name. issue 4: add cookie-parser onto base express dependencies (ironhack-edu#36)
…-edu#38) Co-authored-by: sandrabosk <[email protected]>
…r-middleware response
Interesting, so youre keeping in the error class the status itself? Nice approach! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job!
thank you, yes it avoids having to: res.status(403).json({errorMessage: "forbidden"}) 👉 which is tedious, and does not take advantage of using the error-middleware, which is here for. On the contrary, we can just call the error-middleware for that with our error, optionally augmented with |