/**
 * (C) Copyright 2025, TCCC, All rights reserved.
 */
/**
 * Rich error class for service request failures.
 *
 * Extends `Error` so it is backward-compatible with any code that expects
 * a plain `Error`.  Adds HTTP response context so `onError` handlers in
 * `@kosServiceRequest` can inspect status codes, response bodies, and headers.
 *
 * @example
 * ```typescript
 * errorHandler: {
 *   strategy: 'log',
 *   defaultValue: [],
 *   onError: (error, model) => {
 *     if (error instanceof ServiceRequestError) {
 *       console.error('HTTP', error.status, error.responseBody);
 *     }
 *   }
 * }
 * ```
 *
 * @category Service Request
 * @kosService core.service-request
 * @kosApiLevel 22
 */
export declare class ServiceRequestError extends Error {
    /** HTTP status code (e.g. 404, 500) */
    readonly status: number;
    /** HTTP status text (e.g. "Not Found") */
    readonly statusText: string;
    /**
     * Parsed response body (JSON) or raw text.
     * `undefined` if the body could not be read.
     */
    readonly responseBody: unknown;
    /** Response headers as a plain key/value map */
    readonly responseHeaders: Record<string, string>;
    constructor(message: string, details: {
        status: number;
        statusText: string;
        responseBody?: unknown;
        responseHeaders?: Record<string, string>;
    });
}
/**
 * Context captured from an HTTP error response.
 * Used internally to thread rich error info through the service request pipeline.
 * @internal
 * @kosService core.service-request
 * @kosApiLevel 22
 */
export interface ErrorResponseContext {
    status: number;
    statusText: string;
    responseBody: unknown;
    responseHeaders: Record<string, string>;
}
//# sourceMappingURL=service-request-error.d.ts.map