class Errors { Errors._(); // APP 本地错误代码 static const String ePlatform = '-100'; static const String eApiBase = '-101'; static const String eNoAvailableApi = '-102'; static const String eNoConnectivity = '-103'; static const String eFingerprint = '-104'; static const String eReadLog = '-201'; static const String eUploadLog = '-202'; // 通用错误代码 static const String eForbidden = '-1'; // 用户被禁用 static const int eUserDisabled = 424; // 设备被禁用 static const int eDeviceRestricted = 423; // 当前区域不可用 static const int eRegionNotAvailable = 403; // token实效 static const int eTokenExpired = 401; // VPN 错误代码(500-599) static const int eMethodCall = 400; static const int eVpnUserAuth = 500; //用户未授权 static const int eVpnUserStatus = 501; //用户被禁用或者是需续费 static const int eVpnMaxDevice = 502; //设备数到上限 static const int eVpnConnectServer = 503; //连接服务器失败 static const int eVpnRedisReadError = 504; //Redis读取错误,无法获得用户信息 static const int eVpnIpRegion = 505; //IP地区不一致 static const int eVpnUserExpire = 506; //用户过期 static const int eVpnUserLevelError = 507; //会员级别不一致 static const int eVpnServerOverload = 508; //服务器负载上限 static const int eVpnNoServer = 509; //没有服务器 static const int eVpnInvalidDeviceId = 510; //用户账号下不存在该设备Id static const int eVpnTrialTimeLimited = 511; //试用时长上限 static const int eVpnTellRetry = 512; //重试错误 static const int eVpnBadParam = 513; //参数错误 static const int eVpnConnectRouter = 514; //连接router超时 static const int eVpnInit = 515; //初始化失败 // 自定义错误码 static const int eVpnServerKilled = 1111; // 服务器异常kill static const int eVpnAutoStop = 1112; // 开启vpn时切换后台自动关闭 static const int eVpnNotPermission = 1113; // vpn没有授权 // VPN 错误代码文字描述 static const Map vpnErrorTexts = { eMethodCall: '接口方法调用失败', eVpnUserAuth: '用户未授权', eVpnUserStatus: '用户被禁用或者是需续费', eVpnMaxDevice: '设备数到上限', eVpnConnectServer: '连接服务器失败', eVpnRedisReadError: 'Redis读取错误无法获得用户信息', eVpnIpRegion: 'IP地区不一致', eVpnUserExpire: '用户过期', eVpnUserLevelError: '会员级别不一致', eVpnServerOverload: '服务器负载上限', eVpnNoServer: '没有服务器', eVpnInvalidDeviceId: '用户账号下不存在该设备Id', eVpnTrialTimeLimited: '试用时长上限', eVpnTellRetry: '重试错误', eVpnBadParam: '参数错误', eVpnConnectRouter: '连接route失败', eVpnInit: '初始化失败', eVpnServerKilled: '服务器异常kill', }; // Subscribe 错误代码 static const String eQueryProduct = '600'; static const String ePurchaseSubscription = '601'; static const String eRestoreSubscription = '602'; static const String eVerifyPurchase = '604'; }