add chat to mobile

This commit is contained in:
Peter Maquiran
2024-08-08 11:44:41 +01:00
parent 6d8ef9b1e3
commit 32181caefe
12 changed files with 306 additions and 231 deletions
@@ -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);