UNPKG

turtle-express

Version:

`turtle-express` is kinda a framework or a library based on `express.js` with an opinionated express router with type safety and schema validation with zod. Also many [more features](https://github.com/mm-ninja-turtles/turtle-express/discussions/7) planni

16 lines 468 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.errorHandler = void 0; const errorHandler = (err, req, res, next) => { if (err instanceof Error) { res.status(500); return res.send({ success: false, message: 'Something went wrong!', data: null, error: err.message, }); } }; exports.errorHandler = errorHandler; //# sourceMappingURL=error-handler.js.map