InternalServerErrorHandler.js 630 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.InternalServerErrorHandler = void 0;
  4. const http_1 = require("../base/http");
  5. const i18n_1 = require("../base/i18n");
  6. class InternalServerErrorHandler extends http_1.Middleware {
  7. constructor() {
  8. super(...arguments);
  9. this.order = 10000;
  10. this.route = null;
  11. this.action = (err, req, res, next) => {
  12. res.status(http_1.StatusCodes.INTERNAL_SERVER_ERROR).send((0, i18n_1.$$)('org.crazydoctor.expressts.httpError.500'));
  13. };
  14. }
  15. }
  16. exports.InternalServerErrorHandler = InternalServerErrorHandler;