jsm-core
Version:
Core library for JSM project
10 lines (9 loc) • 405 B
TypeScript
import { NextFunction, Request, Response } from "express";
/**
*
* @description Middleware to handle errors
* TODO: Add logging, and check if the error is a JsmException
* @returns {NextFunction} The next function to be called
*/
declare const errorHandler: () => (err: Error | Jsm.Core.Utils.Api.Response.Error, req: Request, res: Response, next: NextFunction) => void;
export default errorHandler;