Skip to content

[Bug]: Quota retry filter masks non-JSON HTTP 403 errors #40630

Closed

Description

@Gaurav598

What happened?

On current master (1a3f101), retry_on_server_errors_timeout_or_quota_issues_filter raises JSONDecodeError when an apitools HTTP 403 response body is not JSON. That replaces the original HttpError in decorated calls, including BigQuery paths that use this retry filter.

Minimal reproduction with the Python SDK and its GCP dependencies:

from apitools.base.py.exceptions import HttpError
from apache_beam.utils import retry

error = HttpError({"status": "403"}, "<html>upstream error</html>", "https://example.invalid")
retry.retry_on_server_errors_timeout_or_quota_issues_filter(error)

Actual: JSONDecodeError: Expecting value: line 1 column 1 (char 0). Expected: False, so the retry decorator re-raises the original non-retryable HttpError. The 403 branch already treats missing or malformed structured reasons as non-retryable; its exception handler catches KeyError, IndexError, and TypeError, but misses ValueError/JSONDecodeError from json.loads.

I reproduced this with google-apitools 0.5.35 and google-api-core 2.42.0 on Python 3.14.3. No live GCP project or credentials were used. I plan to add a regression test and narrow fix.

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Prism Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Activity

  1. Gaurav598 commented on Oct 16, 2026

    @Gaurav598
    ContributorAuthor

    .take-issue

  2. added this to the 2.78.0 Release milestone on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions