How to use the @feathersjs/errors.PaymentError function in @feathersjs/errors

To help you get started, we’ve selected a few @feathersjs/errors examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github feathersjs-ecosystem / feathers-objection / src / error-handler.js View on Github external
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);