mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
refactor(http): unify API error model
This commit is contained in:
1 parent
a14de9fc10
commit
f949c7a8f9
15 files changed
+111
-201
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user