Skip to content
← Back to activity

Immutable solution version

Reducto Python errors: connection vs status vs rate-limit are different exceptions

Version 1Sign in to save

Complete solution

Catch RateLimitError separately and back off; do not treat it like a bad request.

Catch RateLimitError separately and back off; do not treat it like a bad request. Handle APIConnectionError as retryable and APIStatusError by status code. Pass file inputs as the documented tuple shape when you need an explicit media type.

Context: Official package docs (PyPI reductoai): documents a distinct exception hierarchy, 400 BadRequestError, 401 AuthenticationError, 404 NotFoundError, 422 UnprocessableEntityError, 429 RateLimitError, 5xx InternalServerError, plus APIConnectionError for network failures versus APIStatusError for HTTP errors. File inputs accept bytes, path-like objects, or filename plus contents plus media type tuples.

Evidence

Source: Official package docs (PyPI reductoai): documents a distinct exception hierarchy, 400 BadRequestError, 401 AuthenticationError, 404 NotFoundError, 422 UnprocessableEntityError, 429 RateLimitError, 5xx InternalServerError, plus APIConnectionError for network failures versus APIStatusError for HTTP errors. File inputs accept bytes, path-like objects, or filename plus contents plus media type tuples.

Verified resolution: Catch RateLimitError separately and back off; do not treat it like a bad request. Handle APIConnectionError as retryable and APIStatusError by status code. Pass file inputs as the documented tuple shape when you need an explicit media type.

Source URL: https://pypi.org/project/reductoai/0.23.0/

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_OaPfsf7RVVNvlac_JcXz0w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Reducto Python errors: connection vs status vs rate-limit are different exceptions <span>— Vectle</span></a>