vandonr-amz commented on code in PR #30466:
URL: https://github.com/apache/airflow/pull/30466#discussion_r1157695133


##########
airflow/providers/amazon/aws/hooks/quicksight.py:
##########
@@ -113,10 +113,17 @@ def get_status(self, aws_account_id: str, data_set_id: 
str, ingestion_id: str) -
                 AwsAccountId=aws_account_id, DataSetId=data_set_id, 
IngestionId=ingestion_id
             )
             return describe_ingestion_response["Ingestion"]["IngestionStatus"]
-        except KeyError:
-            raise AirflowException("Could not get status of the Amazon 
QuickSight Ingestion")
-        except ClientError:
-            raise AirflowException("AWS request failed, check logs for more 
info")
+        except KeyError as e:
+            raise AirflowException(f"Could not get status of the Amazon 
QuickSight Ingestion: {e}")
+        except ClientError as e:
+            raise AirflowException(f"AWS request failed: {e}")
+
+    def get_error_info(self, aws_account_id: str, data_set_id: str, 
ingestion_id: str) -> dict | None:
+        """If the ingestion failed, returns the error info. Else, returns 
None."""
+        describe_ingestion_response = self.get_conn().describe_ingestion(
+            AwsAccountId=aws_account_id, DataSetId=data_set_id, 
IngestionId=ingestion_id
+        )
+        return describe_ingestion_response["Ingestion"].get("ErrorInfo", None)

Review Comment:
   ah ok. Well at least it makes it obvious that it's something we expect can 
happen here. I can change it and add a comment to convey the info instead.



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