UNPKG

@unkey/api

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.

33 lines 2.33 kB
import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ValidationError } from "./validationerror.js"; /** * Extended error details specifically for bad request (400) errors. This builds on the BaseError structure by adding an array of individual validation errors, making it easy to identify and fix multiple issues at once. */ export type BadRequestErrorDetails = { /** * A human-readable explanation specific to this occurrence of the problem. This provides detailed information about what went wrong and potential remediation steps. The message is intended to be helpful for developers troubleshooting the issue. */ detail: string; /** * HTTP status code that corresponds to this error. This will match the status code in the HTTP response. Common codes include `400` (Bad Request), `401` (Unauthorized), `403` (Forbidden), `404` (Not Found), `409` (Conflict), and `500` (Internal Server Error). */ status: number; /** * A short, human-readable summary of the problem type. This remains constant from occurrence to occurrence of the same problem and should be used for programmatic handling. */ title: string; /** * A URI reference that identifies the problem type. This provides a stable identifier for the error that can be used for documentation lookups and programmatic error handling. When followed, this URI should provide human-readable documentation for the problem type. */ type: string; /** * List of individual validation errors that occurred in the request. Each error provides specific details about what failed validation, where the error occurred in the request, and suggestions for fixing it. This granular information helps developers quickly identify and resolve multiple issues in a single request without having to make repeated API calls. */ errors: Array<ValidationError>; }; /** @internal */ export declare const BadRequestErrorDetails$inboundSchema: z.ZodType<BadRequestErrorDetails, z.ZodTypeDef, unknown>; export declare function badRequestErrorDetailsFromJSON(jsonString: string): SafeParseResult<BadRequestErrorDetails, SDKValidationError>; //# sourceMappingURL=badrequesterrordetails.d.ts.map