🐛 fix error handler and asset router
This commit is contained in:
parent
ff4246204e
commit
0ef9af4a68
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user