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 all commits
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
13 changes: 12 additions & 1 deletion core/dbt/config/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@
--no-version-check
"""

MALFORMED_PACKAGE_ERROR = """\
The packages.yml file in this project is malformed. Please double check
the contents of this file and fix any errors before retrying.

You can find more information on the syntax for this file here:
https://docs.getdbt.com/docs/package-management

Validator Error:
{error}
"""


def _list_if_none(value):
if value is None:
Expand Down Expand Up @@ -130,7 +141,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.format(error=str(e.message))
) from e
return packages

Expand Down