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
This issue is an improvement to our error handling suggested by @appleYaks in #2643 (comment). We are using the following errors with the corresponding error code in api/index.js:
BadRequest: 400
Unauthorized: 401
NoPermission: 403
NotFound: 404
RequestEntityTooLarge: 413
ValidationError: 422
EmailError: 500
InternalServerError: 500
All existing API errors should be replaced by an error class that holds the corresponding error code. Internal API requests are expected to deal with the error object returned and api.requestHandler() has to convert the object into a valid JSON response.
The text was updated successfully, but these errors were encountered:
promise.then(function(){thrownewCustomError('oops!');}).catch(CustomError,function(e){// Only catch CustomError instances// all other types of errors will propagate automatically}).catch(function(e){// Catch other errors})
This issue is an improvement to our error handling suggested by @appleYaks in #2643 (comment). We are using the following errors with the corresponding error code in
api/index.js
:All existing API errors should be replaced by an error class that holds the corresponding error code. Internal API requests are expected to deal with the error object returned and
api.requestHandler()
has to convert the object into a valid JSON response.The text was updated successfully, but these errors were encountered: