import { ZodError } from 'zod'; import { APIError } from './APIError'; /** * Error thrown when input data (DTO - Data Transfer Object) fails validation against the defined Zod schema. * This error indicates that the client sent invalid or malformed data that doesn't match the API's expected format. * Extends APIError with HTTP 403 status code to indicate a client-side input validation error. * * @example * ```typescript * // API expects { name: string, age: number } * // Client sends { name: "John", age: "invalid" } * // Results in InvalidDTOError being thrown * * try { * await validateDTO(inputData) * } catch (error) { * if (error instanceof InvalidDTOError) { * console.log('Validation errors:', error.zodError?.issues) * } * } * ``` */ export declare class InvalidDTOError extends APIError { readonly zodError?: ZodError | undefined; /** * Creates a new InvalidDTOError instance. * * @param zodError - Optional ZodError containing detailed validation failure information */ constructor(zodError?: ZodError | undefined); } //# sourceMappingURL=InvalidDTOError.d.ts.map