🎨 move field error to util

This commit is contained in:
Flam3rboy
2021-10-05 19:34:13 +02:00
parent 9cf018d737
commit 214d6b821c
7 changed files with 6 additions and 8 deletions
+1 -3
View File
@@ -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) {