@splunk/otel-web-session-recorder
Version:
Session recorder for Splunk Observability
49 lines (48 loc) • 1.95 kB
TypeScript
/**
*
* Copyright 2020-2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
type ResponseTimingData = {
fetchTotalMs: number;
finalRetries: number;
};
type ResponseDebugData = {
bodyUsed: boolean;
headers: Array<[string, string]> | undefined;
ok: boolean;
redirected: boolean;
type: string;
url: string;
};
export declare class ApiError extends Error {
readonly status: number;
readonly responseTimingData: ResponseTimingData;
readonly requestPayload: string;
readonly originalError?: unknown | undefined;
readonly responseData?: (Record<string, unknown> | string | null) | undefined;
readonly additionalData?: Record<string, unknown> | undefined;
readonly isOffline: boolean;
readonly isSignalAborted: boolean;
readonly name = "ApiError";
readonly responseDebugData: ResponseDebugData | undefined;
readonly visibilityState: DocumentVisibilityState;
readonly wasBeaconFallbackUsed: boolean;
get isConnectionError(): boolean;
get isAbortedByRecorder(): boolean;
get isAbortedByUserAgent(): boolean;
constructor(message: string, status: number, responseTimingData: ResponseTimingData, signal: AbortSignal, requestPayload: string, response?: Response, originalError?: unknown | undefined, responseData?: (Record<string, unknown> | string | null) | undefined, additionalData?: Record<string, unknown> | undefined);
}
export {};