mirror of
https://github.com/MrTalon63/NeoMap.git
synced 2026-01-11 11:59:13 +01:00
Add debug env
This commit is contained in:
parent
067594e669
commit
89825059a8
1 changed files with 5 additions and 0 deletions
|
|
@ -100,6 +100,11 @@ app.get("/stats", async (c) => {
|
|||
});
|
||||
|
||||
app.onError((err, c) => {
|
||||
const isDev = Deno.env.get("NODE_ENV") === "development";
|
||||
if (isDev) {
|
||||
console.error(err);
|
||||
return c.json({ status: 500, message: "Server Error", error: err.message }, 500);
|
||||
}
|
||||
return c.json({ status: 500, message: "Server Error" }, 500);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue