summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-07 15:54:15 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-07 15:54:15 +0200
commit482088b91b133f52e452c595d692dc74eb411ea1 (patch)
tree4f6b21c484c5f6d80f785e936a68639169b85295 /src
parent:bug: fix register route captcha required (diff)
downloadserver-482088b91b133f52e452c595d692dc74eb411ea1.tar.xz
fix error handler
Diffstat (limited to 'src')
-rw-r--r--src/middlewares/ErrorHandler.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/middlewares/ErrorHandler.ts b/src/middlewares/ErrorHandler.ts
index 28ff7e6c..25a68865 100644
--- a/src/middlewares/ErrorHandler.ts
+++ b/src/middlewares/ErrorHandler.ts
@@ -16,7 +16,7 @@ export function ErrorHandler(error: Error, req: Request, res: Response, next: Ne
 			errors = error.errors;
 		} else {
 			console.error(error);
-			if (req.server.options.production) {
+			if (req.server?.options?.production) {
 				message = "Internal Server Error";
 			}
 			code = httpcode = 500;