Skip to content

Commit

Permalink
fix(ingest): improve registry error message (#12440)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Jan 23, 2025
1 parent 8eda51e commit 61ed948
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metadata-ingestion/src/datahub/ingestion/api/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ def get(self, key: str) -> Type[T]:

tp = self._ensure_not_lazy(key)
if isinstance(tp, ModuleNotFoundError):
# TODO: Once we're on Python 3.11 (with PEP 678), we can use .add_note()
# to enrich the error instead of wrapping it.
raise ConfigurationError(
f"{key} is disabled; try running: pip install '{__package_name__}[{key}]'"
f"{key} is disabled due to a missing dependency: {tp.name}; try running `pip install '{__package_name__}[{key}]'`"
) from tp
elif isinstance(tp, Exception):
raise ConfigurationError(
Expand Down

0 comments on commit 61ed948

Please sign in to comment.