How to use the http-status.SERVICE_UNAVAILABLE function in http-status

To help you get started, we’ve selected a few http-status 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 SoftwareEngineeringDaily / software-engineering-daily-api / server / controllers / auth.controller.js View on Github external
const cbError = err => {
    if (err) {
      console.log(err); // eslint-disable-line
      const error = new APIError(
        'There was a problem getting a signed url',
        httpStatus.SERVICE_UNAVAILABLE,
        true
      );
      return next(error);
    }
  };
  signS3(config.aws.profilePicBucketName, fileType, newFileName, cbSuccess, cbError);
github SoftwareEngineeringDaily / software-engineering-daily-api / server / controllers / company.controller.js View on Github external
const cbError = err => {
      if (err) {
        console.log(err); // eslint-disable-line
        const error = new APIError(
          'There was a problem getting a signed url',
          httpStatus.SERVICE_UNAVAILABLE,
          true
        );
        return next(error);
      }
    };
    signS3(config.aws.profilePicBucketName, fileType, newFileName, cbSuccess, cbError);
github schubergphilis / microchassis / src / http-server.ts View on Github external
this.server.get(healthUrl, (request: Request, response: Response) => {
      const report = healthManager.getReport();

      if (healthManager.healthy) {
        response.status(httpStatus.OK).send(report);
      } else {
        response.status(httpStatus.SERVICE_UNAVAILABLE).send(report);
      }
    });
  }