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

Make Http.TransportErr match host error behavior

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

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

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust

調査の方向性

platform/InternalHttp.roc:12 の公開 TransportErr 宣言と src/http.rs:167-170 のリクエストエラー変換から始め、次に接続拒否の統合シナリオを調べます。列挙された各失敗の最終的なマッピングを定義して文書化し、バリアントをアサートするようテストを更新し、ドキュメントと例を整合させ、API の変更を release bump のチェックに含めます。

索引モデルが issue の本文から書いたものです。

説明

bug

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:

  1. classify DNS/connect/TLS/socket failures as NetworkError(details), potentially changing its payload; or
  2. remove NetworkError and define when Other is 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 TransportErr variant 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

環境構築

はじめの一歩

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

roc-lang/basic-cli のほかの issue

roc-lang/basic-cli の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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