fix zod validation error
This commit is contained in:
gofnnp 2025-10-07 22:02:28 +04:00
parent 523ed19e44
commit 6fac2a4956
2 changed files with 6 additions and 2 deletions

View File

@ -39,7 +39,7 @@ const PartnerSchema = z
export const UserSchema = z.object({
ipLookup: IpLookupSchema,
profile: ProfileSchema,
profile: ProfileSchema.optional(),
partner: PartnerSchema,
_id: z.string(),
initialIp: z.string().optional(),

View File

@ -160,7 +160,11 @@ class HttpClient {
console.error(`📦 Raw Data:`, data);
console.error(`📋 Schema Expected:`, schema._def);
console.error(`⚠️ Validation Error:`, error);
console.error(`🔍 Data Type:`, typeof data, data === null ? "(null)" : "");
console.error(
`🔍 Data Type:`,
typeof data,
data === null ? "(null)" : ""
);
throw error;
}
} else {