mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 10:06:17 +08:00
feat(server): use zod parse to impl input validation (#10566)
close CLOUD-124
This commit is contained in:
@@ -265,6 +265,12 @@ export const USER_FRIENDLY_ERRORS = {
|
||||
message: ({ max }) => `Query is too long, max length is ${max}.`,
|
||||
},
|
||||
|
||||
validation_error: {
|
||||
type: 'invalid_input',
|
||||
args: { errors: 'string' },
|
||||
message: ({ errors }) => `Validation error, errors: ${errors}`,
|
||||
},
|
||||
|
||||
// User Errors
|
||||
user_not_found: {
|
||||
type: 'resource_not_found',
|
||||
|
||||
Reference in New Issue
Block a user