import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { DubError } from "./duberror.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; /** * A short code indicating the error code returned. */ export declare const Code: { readonly BadRequest: "bad_request"; }; /** * A short code indicating the error code returned. */ export type Code = ClosedEnum; export type ErrorT = { /** * A short code indicating the error code returned. */ code: Code; /** * A human readable explanation of what went wrong. */ message: string; /** * A link to our documentation with more details about this error code */ docUrl?: string | undefined; }; /** * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */ export type BadRequestData = { error: ErrorT; }; /** * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */ export declare class BadRequest extends DubError { error: ErrorT; /** The original data that was passed to this error instance. */ data$: BadRequestData; constructor(err: BadRequestData, httpMeta: { response: Response; request: Request; body: string; }); } /** @internal */ export declare const Code$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ErrorT$inboundSchema: z.ZodType; export declare function errorFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BadRequest$inboundSchema: z.ZodType; //# sourceMappingURL=badrequest.d.ts.map