Expose body-free HTTP status and Retry-After metadata
Maintainer thường phản hồi trong vòng 3 ngày
@bolinfest đang làm issue này rồi.
Từ ngày 14/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Problem
The reqwest Streamable HTTP client preserves structured details for selected
authentication failures, but callers cannot reliably distinguish a 429 or
5xx response or inspect Retry-After. Falling through to response parsing can
also turn the failure into a body-related error that no longer exposes the HTTP
status.
Proposed direction
Return a typed, body-free error for 429 and 5xx responses immediately after
the GET or POST completes:
pub struct HttpStatusError {
pub status: u16,
pub retry_after: Option<String>,
}
Only a valid UTF-8 Retry-After value of at most 128 bytes would be retained.
The response body, request authentication, and other headers would not be
stored in the error.
This is intentionally narrower than #388, which discusses broader rate-limit
behavior. It is also separate from #1246: this proposal does not add response
size configuration, buffered-body limits, trait changes, or body-reading code.
For 429 and 5xx, it returns before reading a body at all.
Planned validation
Loopback reqwest tests would exercise POST 429 and GET 503 responses with
Retry-After, private bodies, and private request state, then verify that the
typed error retains only the intended metadata. A helper test would cover a
valid retry value, invalid UTF-8, and a 129-byte value. Both GET and POST call
sites would use the same classification helper.
Would this error shape and narrow status set fit the transport API?
- Ngôn ngữ chính
- Rust
- Star
- 4k
- Fork
- 662
- Merge trung bình
- 3 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 34
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusCó thể đã có người làm @aton-of-data đã nhận 4 ngày trước. Đang mởbug P2 ready for work T-security T-transport
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/rust-sdk#1339 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeCó thể đã có người làm @jstar0 đã nhận 7 ngày trước. Đang mởbug P1 ready for work T-security T-transport
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
modelcontextprotocol/rust-sdk#1330 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
P3 question Stale T-documentation T-enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
modelcontextprotocol/rust-sdk#1155 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Two rmcp tests fail on Windows: connection-refused text check and `npm` spawn in test_with_jsCó thể đã có người làm @bolinfest đã nhận hôm nay. Đang mởbug P2 ready for work T-test
modelcontextprotocol/rust-sdk#1364 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Client never answers a server `ping` sent during the `initialize` handshakeCó thể đã có người làm @bolinfest đã nhận 1 ngày trước. Đang mởbug P1 ready for work T-service
modelcontextprotocol/rust-sdk#1362 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của modelcontextprotocol/rust-sdk
Issue tương tự
-
documentation good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
sujithputta02/Esapay#13 ·
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
topgrade-rs/topgrade#2419 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
review-bot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midagedev/bloomery#318 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/infra good first issue type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
cristim/AztecCraft#92 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Standalone Unix updater reports success when curl fails (`curl | sh` masks the exit status); Windows path is unaffectedCó thể đã có người làm @akhil9tiet đã nhận hôm nay. Đang mởbug CLI windows-os
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openai/codex#54465 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày