Skip to content

fix: transport error hardening and aitable filter compatibility#98

Open
ybcstudy wants to merge 1 commit intoDingTalk-Real-AI:mainfrom
ybcstudy:fix/transport-error-hardening
Open

fix: transport error hardening and aitable filter compatibility#98
ybcstudy wants to merge 1 commit intoDingTalk-Real-AI:mainfrom
ybcstudy:fix/transport-error-hardening

Conversation

@ybcstudy
Copy link
Copy Markdown

改动概述

Transport 层错误处理健壮性增强 + AITable --filters 兼容性修复。

改动内容

问题 修复 文件
瞬时故障恢复不足 重试次数 2→3 client.go
HTTP 429 限流无处理 解析 Retry-After 头,等待后重试 client.go
EOF/连接重置误报 增强 EOF 检测,自动重试 client.go
非 2xx 错误信息不足 错误消息附带 HTTP 状态码 + body 预览 client.go
错误诊断信息缺失 新增 extractBodyPreview 提取响应体摘要 client.go
aitable --filters 只支持 JSON 字符串 同时支持 JSON 字符串和数组格式 aitable_commands.go

测试

  • go test ./internal/transport/...
  • go test ./internal/helpers/...
  • 所有测试文件已同步更新 httpStatusError 新签名

- Increase retry attempts from 2 to 3 for transient failures
- Add HTTP 429 (rate limit) handling with Retry-After header support
- Improve EOF/connection reset error detection and retry logic
- Add body preview extraction for better error diagnostics
- Include HTTP status code in error messages for non-2xx responses
- Support both JSON string and array formats for aitable --filters flag
- Update httpStatusError signature across all test files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant