@airwallex/node-sdk
Version:
Airwallex Node.js SDK
52 lines • 1.7 kB
TypeScript
export declare class ApiError extends Error {
status?: number;
httpCode?: string;
data?: any;
headers?: any;
constructor(message: string, options?: Partial<ApiError>);
}
export declare class NetworkError extends ApiError {
constructor(message: string, options?: Partial<ApiError>);
}
export declare class TimeoutError extends ApiError {
constructor(message: string, options?: Partial<ApiError>);
}
export declare class AuthenticationError extends ApiError {
constructor(message: string, options?: Partial<ApiError>);
}
export declare class AuthorizationError extends ApiError {
constructor(message: string, options?: Partial<ApiError>);
}
export declare class NotFoundError extends ApiError {
constructor(message: string, options?: Partial<ApiError>);
}
export declare class RateLimitError extends ApiError {
constructor(message: string, options?: Partial<ApiError>);
}
export declare class ValidationError extends ApiError {
constructor(message: string, options?: Partial<ApiError>);
}
export declare class ServerError extends ApiError {
constructor(message: string, options?: Partial<ApiError>);
}
export interface ErrorResponseData {
message?: string;
code?: string;
source?: string;
details?: string[];
[key: string]: any;
}
export interface HttpError {
code?: string;
message: string;
request?: any;
response: {
data?: any;
status: number;
statusText?: string;
headers?: Record<string, string>;
};
}
export declare const RETRYABLE_ERRORS: (typeof NetworkError)[];
export declare function isRetryableError(error: ApiError): boolean;
//# sourceMappingURL=errors.d.ts.map