/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { VantaError } from "./vantaerror.js"; export type OutboundErrorData = { message: string; }; export class OutboundError extends VantaError { /** The original data that was passed to this error instance. */ data$: OutboundErrorData; constructor( err: OutboundErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = err.message || `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; this.name = "OutboundError"; } } /** @internal */ export const OutboundError$inboundSchema: z.ZodType< OutboundError, z.ZodTypeDef, unknown > = z.object({ message: z.string(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new OutboundError(v, { request: v.request$, response: v.response$, body: v.body$, }); });