Transient 502s: retry idempotent reads, distinguish rate limits, expose sending limits

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
api, cli

調査の方向性

Start by tracing how the CLI handles errors for box, search, thread read, and draft show, then compare that with compose and auth status --json. Define the retry, rate-limit, server-error, Retry-After, and sending-limit behavior, including --no-retry and hey limits; done means these cases are distinguishable and documented without automatic compose retries.

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

説明

Context

During bursts of CLI calls, read endpoints return API error: 502 Bad Gateway for a while, then recover on their own: hey box imbox, hey search, hey thread read. The same happens to compose. In the case we saw, reads recovered within minutes while compose kept failing much longer.

From the CLI there is no way to tell whether this is rate limiting, a quota on outbound mail, or a server problem. Every failure is the same generic api error.

No account-specific details below.

Ask

  • Retry idempotent reads (box, search, thread read, draft show) automatically with backoff, a few times, before returning an error. A --no-retry flag can turn it off.
  • Map responses to distinct error codes: 429 as rate_limited, 5xx as server_error. Include Retry-After in the JSON when the server sends it.
  • Document or expose sending limits (messages per hour or day, recipients per message) so batch tools can pace themselves instead of discovering a limit through errors. Something like hey limits, or fields in hey auth status --json, would do.
  • Don't retry compose automatically (see the companion issue on compose 502s after a successful send). For compose, report the outcome clearly instead.

Why it matters

Agent and script workflows (reply checks, follow-ups, stop watchers) run unattended. Transient read errors turn into missed replies or false "no thread" results, and silent limits turn into partial batches.

主要言語
Go
スター
423
フォーク
55
平均マージ
1日 3時間
マージ済み PR(30日)
43

環境構築

はじめの一歩

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

basecamp/hey-cli のほかの issue

basecamp/hey-cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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