Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
throw feathersError;
}
// Objection validation error
if (error.statusCode) {
switch (error.statusCode) {
case 400:
feathersError = new errors.BadRequest(error);
break;
case 401:
feathersError = new errors.NotAuthenticated(error);
break;
case 402:
feathersError = new errors.PaymentError(error);
break;
case 403:
feathersError = new errors.Forbidden(error);
break;
case 404:
feathersError = new errors.NotFound(error);
break;
case 405:
feathersError = new errors.MethodNotAllowed(error);
break;
case 406:
feathersError = new errors.NotAcceptable(error);