fix(miniprogram): 添加全局 ErrorBoundary,修复 tryRefreshToken 静默吞异常

This commit is contained in:
iven
2026-04-24 12:20:34 +08:00
parent f3716dbdc5
commit 74d7efec1f
3 changed files with 42 additions and 3 deletions

View File

@@ -33,8 +33,8 @@ async function tryRefreshToken(): Promise<boolean> {
Taro.setStorageSync('refresh_token', res.data.data.refresh_token);
return true;
}
} catch {
// ignore
} catch (err) {
console.error('[tryRefreshToken] token 刷新失败:', err);
}
Taro.removeStorageSync('access_token');
Taro.removeStorageSync('refresh_token');