InternalServerErrorHandler.js 620 B

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