Skip to content

Commit

Permalink
fix(ingest/nifi): add error handling for version (datahub-project#11385)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal authored Sep 16, 2024
1 parent dc35465 commit d82e478
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion metadata-ingestion/src/datahub/ingestion/source/nifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,12 @@ def create_nifi_flow(self):
)
nifi_version: Optional[str] = None
if about_response.ok:
nifi_version = about_response.json().get("about", {}).get("version")
try:
nifi_version = about_response.json().get("about", {}).get("version")
except Exception as e:
logger.error(
f"Unable to parse about response from Nifi: {about_response} due to {e}"
)
else:
logger.warning("Failed to fetch version for nifi")
cluster_response = self.session.get(
Expand Down

0 comments on commit d82e478

Please sign in to comment.