missing this

This commit is contained in:
Miodec 2021-07-08 15:59:28 +01:00
parent be75c9a3e5
commit 2c5dde2dda

View file

@ -3,12 +3,12 @@ const uuid = require("uuid");
class MonkeyError {
constructor(status, message, stack = null) {
this.status = status ?? 500;
let errorID = uuid.v4();
this.errorID = uuid.v4();
if (this.status === 500) {
this.message =
process.env.MODE === "dev"
? String(stack)
: "Internal Server Error " + errorID;
: "Internal Server Error " + this.errorID;
} else {
this.message =
process.env.MODE === "dev"