Skip to content

fix: identify failed API requests without exposing query tokens - #1185

Open
kocaemre wants to merge 1 commit into
apify:masterfrom
kocaemre:fix/api-error-request-path-1177
Open

kocaemre wants to merge 1 commit into
apify:masterfrom
kocaemre:fix/api-error-request-path-1177

Conversation

@kocaemre

Copy link
Copy Markdown
Contributor

Summary

Verification

  • RED (test before implementation): uv run --extra httpx2 --extra brotli pytest tests/unit/test_client_errors.py -k 'identifies_request_without_exposing_query_token or empty_body_names_http_status' -q -o addopts='' --tb=short → 6 expected failures (missing path, empty-body fallback missing HTTP 502).
  • GREEN: uv run --extra httpx2 --extra brotli pytest tests/unit/test_client_errors.py -q -o addopts='' --tb=short → 94 passed.
  • uv run --extra httpx2 --extra brotli pytest tests/unit -q -n 4 -o addopts='' --tb=short → 2418 passed, 1 skipped.
  • uv run --extra httpx2 --extra brotli ruff check src/apify_client/errors.py src/apify_client/http_clients/_base.py tests/unit/test_client_errors.py → passed.
  • uv run --extra httpx2 --extra brotli ruff format --check src/apify_client/errors.py src/apify_client/http_clients/_base.py tests/unit/test_client_errors.py → passed.
  • uv run --extra httpx2 --extra brotli poe check-docstrings and uv run --extra httpx2 --extra brotli ty check src/apify_client/errors.py src/apify_client/http_clients/_base.py → passed.
  • git diff --check → passed. No live Apify API calls.

AI assistance: implementation and tests were developed with an AI agent and verified locally.

@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the request URL to ApifyApiError and improve the message for an empty error body

1 participant