jscheffl commented on code in PR #56762:
URL: https://github.com/apache/airflow/pull/56762#discussion_r2453164267
##########
task-sdk/src/airflow/sdk/api/client.py:
##########
@@ -812,6 +817,14 @@ def noop_handler(request: httpx.Request) -> httpx.Response:
API_SSL_CERT_PATH = conf.get("api", "ssl_cert")
+def _should_retry_api_request(exception: BaseException) -> bool:
+ """Determine if an API request should be retried based on the exception
type."""
+ if isinstance(exception, httpx.HTTPStatusError):
+ return exception.response.status_code >= 500
Review Comment:
The checks in retryhttp are a bit more explicit, have you considered
replicating the same list instread of just >= 500?
--
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]