fcr-core
Version:
Core APIs for building online scenes
27 lines (26 loc) • 789 B
TypeScript
/**
* 通用重试辅助工具
*
* 提供可复用的重试逻辑判断机制
*/
/**
* 房间相关的不可重试错误码
*/
export declare const ROOM_NON_RETRYABLE_ERRORS: number[];
/**
* 房间加入时的所有不可重试错误码(包含网络和房间错误)
*/
export declare const ROOM_JOIN_NON_RETRYABLE_ERRORS: number[];
/**
* 判断错误是否可以重试
* @param error 错误对象
* @param nonRetryableErrorCodes 不可重试的错误代码列表
* @returns 是否可以重试
*/
export declare function canRetryError(error: Error, nonRetryableErrorCodes: number[]): boolean;
/**
* 判断加入房间错误是否可以重试
* @param error 错误对象
* @returns 是否可以重试
*/
export declare function canRetryJoinError(error: Error): boolean;