uranusjr commented on a change in pull request #19195:
URL: https://github.com/apache/airflow/pull/19195#discussion_r736125871



##########
File path: airflow/providers/amazon/aws/hooks/sagemaker.py
##########
@@ -956,11 +956,10 @@ def _list_request(
                 next_token = response["NextToken"]
 
     def find_processing_job_by_name(self, processing_job_name: str) -> bool:
-        """
-        Query processing job existence by describe_processing_job, rather than 
iterate all the jobs.
-        """
         try:
             res = 
self.get_conn().describe_processing_job(ProcessingJobName=processing_job_name)
             return True
         except ClientError as e:
-            return False
+            if e.response['Error']['Code'] == 'ValidationException':
+                return False
+            raise e

Review comment:
       ```suggestion
               raise
   ```
   
   This preserves the original traceback, which is likely more useful for the 
user.




-- 
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]


Reply via email to