/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import * as operations from "../operations/index.js"; import { WistiaError } from "./wistiaerror.js"; /** * Error due to reaching the video limit of your account or other issues. */ export type PostFormBadRequestErrorData = { error?: operations.PostFormError | undefined; }; /** * Error due to reaching the video limit of your account or other issues. */ export class PostFormBadRequestError extends WistiaError { error?: operations.PostFormError | undefined; /** The original data that was passed to this error instance. */ data$: PostFormBadRequestErrorData; constructor( err: PostFormBadRequestErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "PostFormBadRequestError"; } } /** @internal */ export const PostFormBadRequestError$inboundSchema: z.ZodType< PostFormBadRequestError, z.ZodTypeDef, unknown > = z.object({ error: z.lazy(() => operations.PostFormError$inboundSchema).optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostFormBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });