fixed error showing null string if no stack was present

This commit is contained in:
Miodec 2021-07-08 23:27:33 +01:00
parent 060de11f04
commit fe834b52d0

View file

@ -7,7 +7,9 @@ class MonkeyError {
if (this.status === 500) {
this.message =
process.env.MODE === "dev"
? String(stack)
? stack
? String(stack)
: String(message)
: "Internal Server Error " + this.errorID;
} else {
this.message =