API 报错

This commit is contained in:
董海洋
2026-06-04 08:20:49 +08:00
parent 21d0277a77
commit 5300551e21
7 changed files with 332 additions and 9 deletions
+1
View File
@@ -51,6 +51,7 @@ const errorHandler = async (ctx, next) => {
code: 404,
message: '接口不存在'
}
ctx.status = 404
}
} catch (error) {
console.error('Server error:', error)