You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cli: surface error doc_url + param, fix rate-limit hint code
Add doc_url and param to the CLI error envelope, read from the API error envelope
and emitted only when present, so agents and users get the failing field and a link
to the error's documentation.
Fix the rate-limit hint: it was keyed on `rate_limited`, but the v3 API emits
`rate_limit_exceeded` (429), so real rate limits got no hint. Key the hint on
`rate_limit_exceeded` (and `quota_exceeded`), and align the 429 empty-code fallback
to `rate_limit_exceeded`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,15 +164,15 @@ Every command supports `--help`.
164
164
| Aspect | Behavior |
165
165
|--------|----------|
166
166
|**stdout**| Always JSON. Even `video download` — binary writes to disk; stdout emits `{"asset", "message", "path"}` so you can chain on `.path`. |
167
-
|**stderr**| Structured envelope on error: `{"error": {"code", "message", "hint"}}`. Stable `code` values for programmatic branching. |
167
+
|**stderr**| Structured envelope on error: `{"error": {"code", "message", "hint", "param", "doc_url", "request_id"}}`. `code`/`message` are always present; `hint`/`param`/`doc_url`/`request_id` appear when applicable (`param`/`doc_url` are surfaced from the API for validation and documented errors). Stable `code` values for programmatic branching. |
168
168
|**Exit codes**|`0` ok · `1` API or network · `2` usage · `3` auth / not permitted · `4` timeout under `--wait` (stdout contains partial resource for resume) |
169
169
|**Request bodies**| Flags for simple inputs; `-d` for nested JSON (inline, file path, or `-` for stdin). Flags override matching fields. |
170
170
|**Async jobs**|`--wait` blocks with exponential backoff; `--timeout` sets max (default 20m). 429s and 5xx retry automatically. |
171
171
172
172
Example error envelope:
173
173
174
174
```json
175
-
{"error": {"code": "not_found", "message": "Video not found", "hint": "Check ID with: heygen video list"}}
175
+
{"error": {"code": "not_found", "message": "Video not found", "hint": "Check ID with: heygen video list", "doc_url": "https://developers.heygen.com/docs/error-codes#not-found"}}
0 commit comments