You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current error response from email-service is to include the error message in a json payload under the key error. This is useful for development, but for more advanced purposes it would be ideal to allow for customization of this error response. Specifically, the company I am working for has standardized an error response from our APIs that I'd like our running version of email-service to conform to.
I'm going to fork and put together a working example, but want to raise this issue so I can get feedback if there is a particular way you folks would like this done.
Thanks for the great service! Will report back with a PR within the next week or so.
The text was updated successfully, but these errors were encountered:
One library which does error handling well is Celebrate. They throw all errors and then provide a function (Celebrate.errors()) which adds their error handler. If the developer doesn't want their error handler than they don't add that as middleware and add their own custom error middleware themselves. I think that provides the best functionality for end users.
The current error response from email-service is to include the error message in a json payload under the key
error
. This is useful for development, but for more advanced purposes it would be ideal to allow for customization of this error response. Specifically, the company I am working for has standardized an error response from our APIs that I'd like our running version of email-service to conform to.I'm going to fork and put together a working example, but want to raise this issue so I can get feedback if there is a particular way you folks would like this done.
Thanks for the great service! Will report back with a PR within the next week or so.
The text was updated successfully, but these errors were encountered: