Full Stack Engineer with a history of working in the computer software industry following global best practices in building scalable technology solutions. A graduate of Maths/Statistics.
Just like Express is unopinionated, how you apply the concept in the article is also unopinionated. And except I do not understand you clearly, it'd not make sense semantically to throw a success response as an error. Thanks for sharing your views.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is cool,
Just one opinion, i feel it should be expanded to be not just Error Handler but statusHandler
```
class statusHandler extends Error {
constructor(statusCode, message, data) {
super();
this.statusCode = statusCode;
this.message = message;
this.data = data || null
}
}
module.exports = {
statusHandler
}
Just like Express is unopinionated, how you apply the concept in the article is also unopinionated. And except I do not understand you clearly, it'd not make sense semantically to throw a success response as an error. Thanks for sharing your views.