UNPKG

@yubing744/rooch-sdk

Version:
23 lines (22 loc) 676 B
export declare enum ErrorCategory { INVALID_ARGUMENT = 1, OUT_OF_RANGE = 2, INVALID_STATE = 3, UNAUTHENTICATED = 4, PERMISSION_DENIED = 5, NOT_FOUND = 6, ABORTED = 7, ALREADY_EXISTS = 8, RESOURCE_EXHAUSTED = 9, CANCELLED = 10, INTERNAL = 11, NOT_IMPLEMENTED = 12, UNAVAILABLE = 13 } export interface SubStatus { category: ErrorCategory; reason: number; } export declare function parseRoochErrorCode(errorMessage: string | null): number | null; export declare function parseRoochErrorSubStatus(errorMessage: string | null): SubStatus | null; export declare function getErrorCategoryName(code: ErrorCategory): string;