Skip to content

Commit

Permalink
fix(tableau): extra defensive error-handling (#6503)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Nov 21, 2022
1 parent 05a0f3e commit fdb74b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metadata-ingestion/src/datahub/ingestion/source/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ def get_connection_object_page(
if "errors" in query_data:
errors = query_data["errors"]
if all(
error.get("extensions", {}).get("severity", None) == "WARNING"
# The format of the error messages is highly unpredictable, so we have to
# be extra defensive with our parsing.
error and (error.get("extensions") or {}).get("severity") == "WARNING"
for error in errors
):
self.report.report_warning(key=connection_type, reason=f"{errors}")
Expand Down

0 comments on commit fdb74b0

Please sign in to comment.