mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 22:35:40 +00:00
🐛 fix error handler and asset router
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user