Skip to content

Commit a205241

Browse files
committed
Updates to common package
1 parent 436643a commit a205241

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples_new/microservices/common/src/middlewares/errorHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const errorHandler = (err: Error, req: Request, res: Response, next: Next
66
console.log(err.message);
77
// check if incoming error extends the CustomError class
88
if (err instanceof CustomError) {
9-
return res.status(err.statusCode).send(err.formatError);
9+
return res.status(err.statusCode).send(err.formatError());
1010
}
1111

1212
// if not a custom error send default internal error message

0 commit comments

Comments
 (0)