mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
missing this
This commit is contained in:
parent
be75c9a3e5
commit
2c5dde2dda
1 changed files with 2 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue