Gaurav598 opened a new pull request, #40631: URL: https://github.com/apache/beam/pull/40631
## Summary - Preserve the original `HttpError` when a quota retry filter sees an HTTP 403 response with non-JSON content. ## Problem and root cause The filter parses 403 content to distinguish transient quota errors. Malformed JSON raises `JSONDecodeError`, which escapes the filter and masks the HTTP error in decorated calls, including BigQuery callers. ## Implementation Add `ValueError` to the existing malformed-response handler and test a real `apitools` 403 through the retry decorator. The test checks that the same `HttpError` is re-raised without retrying. ## Validation - Before fix: the new test failed with `JSONDecodeError` at `json.loads`. - After fix: `python -m unittest apache_beam.utils.retry_test` passed 36/36. - Ruff 0.15.22, YAPF 0.43.0, Python compilation, and `git diff --check` passed. - No live GCP integration test was run; no credentials were used. ## Compatibility and risk Valid JSON 403 quota responses retain their existing behavior. Responses with unparseable reasons take the existing non-retryable path. No dependency or generated file changed. Fixes #40630 AI assistance was used to investigate, develop, and validate this patch. The contributor is responsible for the submitted change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
