Skip to content

Commit

Permalink
Added exception handling for datasources list
Browse files Browse the repository at this point in the history
  • Loading branch information
S1LV3RJ1NX committed May 23, 2024
1 parent 3527c0f commit c709fb6
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions backend/modules/metadata_store/truefoundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,15 @@ async def list_data_sources(self) -> List[str]:
data_sources = []
for run in ml_runs:
run_params = run.get_params()
data_sources.append(
{
"type": run_params.get("data_source_fqn").split("::")[0],
"uri": run_params.get("data_source_fqn").split("::")[1],
"fqn": run_params.get("data_source_fqn"),
}
)
try:
data_sources.append(
{
"type": run_params.get("data_source_fqn").split("::")[0],
"uri": run_params.get("data_source_fqn").split("::")[1],
"fqn": run_params.get("data_source_fqn"),
}
)
except Exception as e:
logger.error(f"Error in listing data sources: {e}")
continue
return data_sources

0 comments on commit c709fb6

Please sign in to comment.