Skip to content

Commit 699677e

Browse files
committed
🔧 re-add next parameter for middleware
1 parent 2c704e3 commit 699677e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/middlewares/error-handler.middleware.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import { Request, Response } from 'express';
1+
import { NextFunction, Request, Response } from 'express';
22
import { ServerError } from '../models';
33

44
export function errorHandlerMiddleware(
55
error: Error | ServerError,
66
req: Request,
77
res: Response,
8+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
9+
next: NextFunction,
810
): void {
911
if (error instanceof ServerError) {
1012
res.status(error.status).send(error.message);

0 commit comments

Comments
 (0)