/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ErrorDetail = { /** * Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id' */ location?: string | undefined; /** * Error message text */ message?: string | undefined; /** * The value at the given location */ value?: any | undefined; }; /** @internal */ export const ErrorDetail$inboundSchema: z.ZodType< ErrorDetail, z.ZodTypeDef, unknown > = z.object({ location: z.string().optional(), message: z.string().optional(), value: z.any().optional(), }); export function errorDetailFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ErrorDetail$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorDetail' from JSON`, ); }