uranusjr commented on code in PR #27775:
URL: https://github.com/apache/airflow/pull/27775#discussion_r1027636610
##########
airflow/providers/amazon/aws/hooks/batch_client.py:
##########
@@ -363,10 +363,8 @@ def get_job_description(self, job_id: str) -> dict:
return self.parse_job_description(job_id, response)
except botocore.exceptions.ClientError as err:
- error = err.response.get("Error", {})
- if error.get("Code") == "TooManyRequestsException":
- pass # allow it to retry, if possible
- else:
+ # Allow it to retry in case of exceeded quota limit of
requests to AWS API
+ if err.response.get("Error", {}).get("Code") !=
"TooManyRequestsException":
raise AirflowException(f"AWS Batch job ({job_id})
description error: {err}")
Review Comment:
I feel this block can be deleted entirely. Coercing the exception to
AirflowException is not particularly useful.
--
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]