Make Http.TransportErr match host error behavior
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
調査の方向性
platform/InternalHttp.roc:12 の公開 TransportErr 宣言と src/http.rs:167-170 のリクエストエラー変換から始め、次に接続拒否の統合シナリオを調べます。列挙された各失敗の最終的なマッピングを定義して文書化し、バリアントをアサートするようテストを更新し、ドキュメントと例を整合させ、API の変更を release bump のチェックに含めます。
索引モデルが issue の本文から書いたものです。
説明
Context
InternalHttp.TransportErr declares:
[Timeout, NetworkError, BadBody, Other(List(U8))]
in platform/InternalHttp.roc:12.
The Rust host constructs Timeout, BadBody, and Other, but never constructs NetworkError. Every error returned by client.request(request).await is converted to Other(err.to_string().as_bytes()) at src/http.rs:167-170.
The connection-refused integration scenario currently demonstrates this behavior: it produces HttpErr(Other(... "client error (Connect)" ...)).
This is related to #142, which was closed because error details are now retained in Other. The remaining problem is that the public union still advertises an unreachable NetworkError variant.
Suggested direction
Choose and document one consistent contract:
- classify DNS/connect/TLS/socket failures as
NetworkError(details), potentially changing its payload; or - remove
NetworkErrorand define whenOtheris used.
Prefer stable structured categories over matching Hyper's display strings. Preserve useful diagnostic details without making callers parse text to identify ordinary network failures.
Acceptance criteria
- Every public
TransportErrvariant has a documented, reachable meaning, or unreachable variants are removed. - Connection refused, DNS failure, TLS failure, timeout, invalid response body, and request-construction failure are mapped intentionally.
- Tests assert error variants, not only that an HTTP request failed.
- Documentation and examples reflect the final error shape.
- Any API change is included in the release bump check.
- 主要言語
- Rust
- スター
- 121
- フォーク
- 46
- 平均マージ
- 19時間 1分
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
roc-lang/basic-cli のほかの issue
-
Unix socket supportオープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
roc-lang/basic-cli#455 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
roc-lang/basic-cli の issue をすべて見る
似ている issue
-
area/cli parity
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
A-Picking A-UI C-Bug D-Trivial S-Ready-For-Implementation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bevyengine/bevy#26029 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
ai_p3 comp-protocols
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ClickHouse/ClickHouse#123884 ·
メンテナーはふだん 1 日以内に返信
-
state:needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
zed-industries/zed#65146 ·
メンテナーはふだん 1 日以内に返信