summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-04 11:23:12 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-04 11:23:12 +0200
commit0ef9af4a68ff2a7f644ddcbdccb9db27e9e28785 (patch)
tree6b52bbe81241999fdccf6204b7cbd44481983b16 /api
parentMerge branch 'master' of https://github.com/fosscord/fosscord-api (diff)
downloadserver-0ef9af4a68ff2a7f644ddcbdccb9db27e9e28785.tar.xz
:bug: fix error handler and asset router
Diffstat (limited to 'api')
-rw-r--r--api/src/middlewares/ErrorHandler.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/middlewares/ErrorHandler.ts b/api/src/middlewares/ErrorHandler.ts
index 34827cab..179c5991 100644
--- a/api/src/middlewares/ErrorHandler.ts
+++ b/api/src/middlewares/ErrorHandler.ts
@@ -19,7 +19,7 @@ export function ErrorHandler(error: Error, req: Request, res: Response, next: Ne
 			code = error.code;
 			message = error.message;
 			httpcode = error.httpStatus;
-		} else if (error as EntityNotFoundError) {
+		} else if (error instanceof EntityNotFoundError) {
 			message = `${(error as any).stringifyTarget} could not be found`;
 			code = 404;
 		} else if (error instanceof FieldError) {