UNPKG

@fullstory/server-api-client

Version:

The official FullStory server API client SDK for NodeJS.

28 lines (27 loc) 1.02 kB
import { ErrorResponse } from '../model/events.index'; import { FSError } from '.'; export declare enum FSErrorName { ERROR_UNKNOWN = "FS_UNKNOWN", ERROR_TIMEOUT = "FS_TIMEOUT", ERROR_MAX_RETRY = "FS_MAX_RETRY", ERROR_RATE_LIMITED = "FS_RATE_LIMITED", ERROR_FULLSTORY = "FS_FULLSTORY_API", ERROR_PARSE_RESPONSE = "FS_ERROR_PARSE_RESPONSE", ERROR_INVALID_ARGUMENT = "FS_ERROR_INVALID_ARGUMENT" } export declare class FSBaseError extends Error implements FSError { discriminator: 'FSError'; readonly name: FSErrorName; readonly cause?: Error; [key: string]: any; constructor(name: FSErrorName, message: string, cause?: any); chain(err: Error): this; canRetry(): boolean; getRetryAfter(): number; private prependStackTrace; protected setFSErrorPayload(payload: ErrorResponse | string): void; protected addAdditionalProperties(additionalProps?: { [key: string]: any; }): void; } export declare function toError(e: unknown): Error | undefined;