Currently, the error middleware has the following code:
import { ErrorRequestHandler, Request, Response } from 'express';
import CustomError from '../errors/custom.error';
export const errorMiddleware: ErrorRequestHandler = (
error: Error,
_: Request,
res: Response
) =>
When I run the code with an error, the error middleware does not get called. The signature must conform to what they expect. To make it runnable I suggest the following changes:
```typescript
import { ErrorRequestHandler, NextFunction, Request, Response } from 'express';
import CustomError from '../errors/custom.error';
export const errorMiddleware: ErrorRequestHandler = (
error: Error,
_: Request,
res: Response,
next: NextFunction
) => {