Skip to content

Add missing exit codes: ERROR_TIMEOUT and ERROR_RATE_LIMITED #2

@minhdqdev

Description

@minhdqdev

Problem

The current utils/exit_codes.py is missing two important exit codes that are commonly needed when making API calls:

  • ERROR_TIMEOUT (code 7): For when a request times out
  • ERROR_RATE_LIMITED (code 8): For when we hit a rate limit

Expected Changes

In src/todopro_cli/utils/exit_codes.py:

  1. Add ERROR_TIMEOUT = 7 with docstring comment
  2. Add ERROR_RATE_LIMITED = 8 with docstring comment
  3. Add both to code_names dict in get_exit_code_name()
  4. Add both to descriptions dict in get_exit_code_description()
  5. Add both to AGENT_ACTIONS dict with appropriate agent action suggestions

Notes

  • ERROR_TIMEOUT agent action: "Wait and retry with exponential backoff"
  • ERROR_RATE_LIMITED agent action: "Wait for rate limit window to reset, then retry"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions