summary refs log tree commit diff
path: root/api/src/middlewares/ErrorHandler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/middlewares/ErrorHandler.ts')
-rw-r--r--api/src/middlewares/ErrorHandler.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/api/src/middlewares/ErrorHandler.ts b/api/src/middlewares/ErrorHandler.ts

index d8e44bd7..be2586cf 100644 --- a/api/src/middlewares/ErrorHandler.ts +++ b/api/src/middlewares/ErrorHandler.ts
@@ -2,9 +2,8 @@ import { NextFunction, Request, Response } from "express"; import { HTTPError } from "lambert-server"; import { EntityNotFoundError } from "typeorm"; import { FieldError } from "../util/instanceOf"; -import { ApiError } from "../util/ApiError"; +import { ApiError } from "@fosscord/util"; -// TODO: update with new body/typorm validation export function ErrorHandler(error: Error, req: Request, res: Response, next: NextFunction) { if (!error) return next();