mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-08 10:09:30 +00:00
Remove 2 unnecessary indirection layers (_handle_api_transient_error and _api_handle_transient_http_error) from the cloud API retry infrastructure. The old _handle_api_transient_error had a bug where "network" was passed as the attempt parameter to _api_should_retry_on_error, which expects a numeric value. The retry logic is now inlined directly in _cloud_api_retry_loop, calling _api_should_retry_on_error with the correct arguments. Also extract duplicated help-flag checking in dispatchCommand into a hasTrailingHelpFlag helper, reducing nesting and removing repeated code. Net: -72 lines, 2 fewer functions, 1 bug fix. Agent: complexity-hunter Co-authored-by: A <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| common.sh | ||