feat(server): use zod parse to impl input validation (#10566)

close CLOUD-124
This commit is contained in:
fengmk2
2025-03-06 10:40:00 +00:00
parent 84e2dda3f8
commit d2b45783ea
6 changed files with 141 additions and 1 deletions
@@ -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',