From 1492751d58ba74c5525d5f6e846a079ca91ad15f Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Tue, 5 Oct 2021 19:34:13 +0200 Subject: :art: move field error to util --- api/src/middlewares/ErrorHandler.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'api/src/middlewares') diff --git a/api/src/middlewares/ErrorHandler.ts b/api/src/middlewares/ErrorHandler.ts index 96e703ce..2012b91c 100644 --- a/api/src/middlewares/ErrorHandler.ts +++ b/api/src/middlewares/ErrorHandler.ts @@ -1,8 +1,6 @@ import { NextFunction, Request, Response } from "express"; import { HTTPError } from "lambert-server"; -import { EntityNotFoundError } from "typeorm"; -import { FieldError } from "@fosscord/api"; -import { ApiError } from "@fosscord/util"; +import { ApiError, FieldError } from "@fosscord/util"; const EntityNotFoundErrorRegex = /"(\w+)"/; export function ErrorHandler(error: Error, req: Request, res: Response, next: NextFunction) { -- cgit 1.5.1