From 879587d62b8606ab3d57e4a7b0c484f75b64cbda Mon Sep 17 00:00:00 2001 From: xnacly Date: Fri, 3 Sep 2021 21:29:17 +0200 Subject: moved Constants and Errorhandler from api to util --- api/src/middlewares/ErrorHandler.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'api/src/middlewares') 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(); -- cgit 1.4.1