it0/it0_app/lib/core
hailin 666b173906 fix: 根治 Unhandled Exception — async void 拦截器 + 全局错误兜底
根本原因:Dio interceptor 的 onError/onRequest 签名是 void,
标 async 后变成 Future<void> 但没人 await,内部异常全部变成
Unhandled Exception 崩溃。

修复:
- RetryInterceptor: onError 改为同步调度,retry 逻辑移到独立
  _retry() 方法并用 try/catch 包裹全部路径
- DedupInterceptor: 防止 Completer 重复 complete,retry 请求
  跳过去重避免与原始请求冲突
- TokenInterceptor: onRequest 和 onError 的 async lambda 全部
  包裹 try/catch,异常时 fallback 到 handler.next()
- main.dart: 三层全局错误兜底 —
  1) FlutterError.onError 捕获框架错误
  2) PlatformDispatcher.onError 捕获平台通道错误
  3) runZonedGuarded 捕获所有漏网的异步异常
- receiveTimeout/sendTimeout 不再触发重试(服务器已收到请求)
- 超时调整: connect 10s, send 30s, receive 30s
- 仪表盘卡片 IntrinsicHeight 等高对齐

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 04:37:39 -08:00
..
audio feat: 完成 iAgent App 三大功能 + 修复租户上下文 2026-02-23 01:10:52 -08:00
config feat: 完成 iAgent App 三大功能 + 修复租户上下文 2026-02-23 01:10:52 -08:00
errors feat: 生产级 API 错误处理 — 重试拦截器、友好错误提示、网络监测、WebSocket 退避 2026-02-23 04:01:04 -08:00
network fix: 根治 Unhandled Exception — async void 拦截器 + 全局错误兜底 2026-02-23 04:37:39 -08:00
router feat: 生产级 API 错误处理 — 重试拦截器、友好错误提示、网络监测、WebSocket 退避 2026-02-23 04:01:04 -08:00
services feat: 补齐大厂级网络层 — 401并发锁、请求去重、结构化错误日志 2026-02-23 04:05:53 -08:00
tenant Initial commit: IT0 AI-powered server cluster operations platform 2026-02-08 22:54:37 -08:00
theme feat: 完成 iAgent App 三大功能 + 修复租户上下文 2026-02-23 01:10:52 -08:00
utils Initial commit: IT0 AI-powered server cluster operations platform 2026-02-08 22:54:37 -08:00
widgets feat: 生产级 API 错误处理 — 重试拦截器、友好错误提示、网络监测、WebSocket 退避 2026-02-23 04:01:04 -08:00