/**
 * Standardized error response builder.
 * Ensures all proxy error responses follow the Anthropic Messages API error format:
 * { type: "error", error: { type: "...", message: "..." } }
 */
import type { ServerResponse } from 'node:http';
export type ErrorType = 'invalid_request_error' | 'authentication_error' | 'permission_error' | 'not_found_error' | 'rate_limit_error' | 'api_error' | 'overloaded_error';
export interface AnthropicError {
    type: 'error';
    error: {
        type: ErrorType;
        message: string;
    };
}
/**
 * Map HTTP status codes to Anthropic error types.
 */
export declare function errorTypeForStatus(status: number): ErrorType;
/**
 * Build a standard Anthropic error response body.
 */
export declare function buildErrorBody(status: number, message: string, type?: ErrorType): AnthropicError;
/**
 * Send a standard error response on a ServerResponse.
 */
export declare function sendError(res: ServerResponse, status: number, message: string, type?: ErrorType): void;
/**
 * Wrap an unknown error into a standard 500 response.
 */
export declare function sendInternalError(res: ServerResponse, err: unknown): void;
