mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
fix test typings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Exception } from "core";
|
||||
import { Exception, isDebug } from "core";
|
||||
import { type Static, StringEnum, Type } from "core/utils";
|
||||
import { cors } from "hono/cors";
|
||||
import { Module } from "modules/Module";
|
||||
@@ -102,6 +102,12 @@ export class AppServer extends Module<typeof serverConfigSchema> {
|
||||
return c.json(err.toJSON(), err.code as any);
|
||||
}
|
||||
|
||||
if (err instanceof Error) {
|
||||
if (isDebug()) {
|
||||
return c.json({ error: err.message, stack: err.stack }, 500);
|
||||
}
|
||||
}
|
||||
|
||||
return c.json({ error: err.message }, 500);
|
||||
});
|
||||
this.setBuilt();
|
||||
|
||||
Reference in New Issue
Block a user