Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ export async function uploadFile(fn: string, key?: string) {
});
} catch (error) {
if (isProxyRelatedError(error)) {
const rawMessage =
error instanceof Error ? error.message : String(error);
const rawMessage = error instanceof Error ? error.message : String(error);
throw new Error(
`${rawMessage}\n\n${t('proxyNetworkError')}\n${t('proxyNetworkErrorTips')}`,
);
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,6 @@ This can reduce the risk of inconsistent dependencies and supply chain attacks.
apkExtracted: 'APK extracted to {{output}}',
proxyNetworkError:
'Network error — likely caused by a proxy/VPN. Please try disabling your proxy and retry.',
proxyNetworkErrorTips: 'Common fixes:\n1. Disable system proxy or VPN\n2. Check HTTP_PROXY / HTTPS_PROXY environment variables\n3. Check proxy settings in .npmrc',
proxyNetworkErrorTips:
'Common fixes:\n1. Disable system proxy or VPN\n2. Check HTTP_PROXY / HTTPS_PROXY environment variables\n3. Check proxy settings in .npmrc',
};
3 changes: 2 additions & 1 deletion src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,6 @@ export default {
apkExtracted: 'APK 已提取到 {{output}}',
proxyNetworkError:
'网络连接异常,可能是代理/VPN 导致。请尝试关闭代理后重试。',
proxyNetworkErrorTips: '常见解决方法:\n1. 关闭系统代理或 VPN\n2. 检查 HTTP_PROXY / HTTPS_PROXY 环境变量\n3. 检查 .npmrc 中的 proxy 配置',
proxyNetworkErrorTips:
'常见解决方法:\n1. 关闭系统代理或 VPN\n2. 检查 HTTP_PROXY / HTTPS_PROXY 环境变量\n3. 检查 .npmrc 中的 proxy 配置',
};