Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making error msg for malformed packages.yml better #2078

Merged
merged 5 commits into from
Feb 11, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion core/dbt/config/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
--no-version-check
"""

MALFORMED_PACKAGE_ERROR = """\
packages.yml is malformed, please make sure that it matches
sonac marked this conversation as resolved.
Show resolved Hide resolved
https://docs.getdbt.com/docs/package-management#section-how-do-i-add-a-package-to-my-project
"""


def _list_if_none(value):
if value is None:
Expand Down Expand Up @@ -130,7 +135,7 @@ def package_config_from_data(packages_data):
packages = PackageConfig.from_dict(packages_data)
except ValidationError as e:
raise DbtProjectError(
'Invalid package config: {}'.format(validator_error_message(e))
MALFORMED_PACKAGE_ERROR
sonac marked this conversation as resolved.
Show resolved Hide resolved
) from e
return packages

Expand Down