Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Expose body-free HTTP status and Retry-After metadata

オープン
#1,356 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@bolinfest がすでに取り組んでいます。

2026年10月14日 から。

評価

この issue はまだ評価されていません。

説明

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?

主要言語
Rust
スター
4k
フォーク
662
平均マージ
3日 19時間
マージ済み PR(30日)
35

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/rust-sdk のほかの issue

modelcontextprotocol/rust-sdk の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。