develop
fix zod validation error
This commit is contained in:
parent
523ed19e44
commit
6fac2a4956
@ -39,7 +39,7 @@ const PartnerSchema = z
|
|||||||
|
|
||||||
export const UserSchema = z.object({
|
export const UserSchema = z.object({
|
||||||
ipLookup: IpLookupSchema,
|
ipLookup: IpLookupSchema,
|
||||||
profile: ProfileSchema,
|
profile: ProfileSchema.optional(),
|
||||||
partner: PartnerSchema,
|
partner: PartnerSchema,
|
||||||
_id: z.string(),
|
_id: z.string(),
|
||||||
initialIp: z.string().optional(),
|
initialIp: z.string().optional(),
|
||||||
|
|||||||
@ -160,7 +160,11 @@ class HttpClient {
|
|||||||
console.error(`📦 Raw Data:`, data);
|
console.error(`📦 Raw Data:`, data);
|
||||||
console.error(`📋 Schema Expected:`, schema._def);
|
console.error(`📋 Schema Expected:`, schema._def);
|
||||||
console.error(`⚠️ Validation Error:`, error);
|
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;
|
throw error;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user