Skip to content

RatelimitException is defined but never raised — users cannot catch rate limits distinctly #478

Description

@chirag127

Problem

RatelimitException is declared in ddgs/exceptions.py:8 but is never raised anywhere in the codebase. Rate-limit errors from search engines bubble up as generic DDGSException, so callers cannot catch rate-limit errors distinctly to trigger backoff/retry.

Steps

  1. pip install ddgs==9.14.4
  2. grep -rn RatelimitException ddgs/ in the installed package

Expected

At least one raise site (e.g. HTTP 429 in http_client.py, or a per-engine mapping) so users can except RatelimitException.

Actual

Only the class definition matches. Zero raise sites. Verified against main @ ddgs/exceptions.py:8, ddgs/http_client.py, and all ddgs/engines/*.py.

Environment

  • OS: any
  • Python: >=3.10 (per pyproject.toml)
  • ddgs: 9.14.4 (ddgs/__init__.py:11)

Related closed issues about rate limiting: #290, #272, #101.

Thanks for maintaining deedy5/ddgs!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions