a bit timeout

This commit is contained in:
2022-04-18 21:42:20 +03:00
parent 2e159814e4
commit 544046f43d
14 changed files with 149 additions and 1 deletions

1
dist/utils/error-handling.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export declare const errorHandle: (error: any, req: any, res: any, next: any) => void;

9
dist/utils/error-handling.js vendored Normal file
View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.errorHandle = void 0;
const errorHandle = (error, req, res, next) => {
res.status(500).send({
error: error.message || 'some error'
});
};
exports.errorHandle = errorHandle;