fix: 更新router报错
This commit is contained in:
parent
2393dfe273
commit
7f369b7b07
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@kevisual/router",
|
||||
"version": "0.0.5-alpha-1",
|
||||
"version": "0.0.5",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.js",
|
||||
|
@ -363,10 +363,11 @@ export class QueryRouter {
|
||||
} catch (e) {
|
||||
if (route?.isDebug) {
|
||||
console.error('=====debug====:middlerware error');
|
||||
console.error('=====debug====:', e);
|
||||
console.error('=====debug====:[path:key]:', `${route.path}-${route.key}`);
|
||||
console.error('=====debug====:', e.message);
|
||||
}
|
||||
if (e instanceof CustomError) {
|
||||
if (e instanceof CustomError || e?.code) {
|
||||
ctx.code = e.code;
|
||||
ctx.message = e.message;
|
||||
ctx.body = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user