mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
add chat to mobile
This commit is contained in:
@@ -20,8 +20,8 @@ export function APIReturn(schema: z.ZodTypeAny, context: string) {
|
||||
if (error instanceof ZodError) {
|
||||
// If validation fails, throw an error with the details
|
||||
//
|
||||
ColoredLoggerService.error(error.errors, 'API unexpected data structure '+ context, schema._def.description)
|
||||
|
||||
ColoredLoggerService.error(error.errors, 'API unexpected data structure '+ context)
|
||||
console.error(result.value)
|
||||
// Capture the Zod validation error with additional context
|
||||
Sentry.withScope((scope) => {
|
||||
scope.setTag('APIReturn', 'user');
|
||||
|
||||
@@ -64,6 +64,7 @@ export function SafeValidateSchema(schema: Schema, context: string) {
|
||||
tracing?.setAttribute?.('map.error.schema-'+i, JSON.stringify(schema))
|
||||
}
|
||||
ColoredLoggerService.error(e.errors, 'socket unexpected data structure '+ context, schema._def.description)
|
||||
console.error(args[0])
|
||||
|
||||
}
|
||||
return originalMethod.apply(this, args);
|
||||
|
||||
Reference in New Issue
Block a user