refactor(http): unify API error model

This commit is contained in:
digua committed 2026-07-16 20:09:18 +08:00
1 parent a14de9fc10
commit f949c7a8f9
15 files changed
+111 -201

No files matched your search

+2 -2
View File
@@ -5,14 +5,14 @@
*/
import Fastify, { type FastifyInstance, type FastifyError } from 'fastify'
import { authHook } from '@openchatlab/http-routes/auth'
import {
authHook,
ApiError,
ApiErrorCode,
apiErrorFromUnknown,
errorResponse,
serverError,
} from '@openchatlab/http-routes'
} from '@openchatlab/http-routes/errors'
import { appLogger } from '@openchatlab/node-runtime'
const JSON_BODY_LIMIT = 50 * 1024 * 1024 // 50MB