kaxil commented on code in PR #70177: URL: https://github.com/apache/airflow/pull/70177#discussion_r4473342848
########## providers/anthropic/src/airflow/providers/anthropic/triggers/batch.py: ########## @@ -29,6 +31,11 @@ from airflow.triggers.base import BaseTrigger, TriggerEvent +def _is_permanent_poll_error(error: Exception) -> bool: + """Return whether an Anthropic batch polling error cannot succeed on a retry.""" + return isinstance(error, APIStatusError) and 400 <= error.status_code < 500 and error.status_code != 429 Review Comment: Pushed a follow-up commit: the check now mirrors the SDK's `_should_retry`, so 408/409 stay retryable and `x-should-retry` wins when the server sends it. Also applied it to the sync `wait_for_batch` loop so `deferrable=False` behaves the same. -- 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]
