Skip to content

Commit

Permalink
Merge pull request #2078 from sonac/packages-err-msg
Browse files Browse the repository at this point in the history
making error msg for malformed packages.yml better
  • Loading branch information
drewbanin authored Feb 11, 2020
2 parents 1d329e0 + d354aa6 commit 25235a4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion core/dbt/config/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,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 @@ -129,7 +140,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

0 comments on commit 25235a4

Please sign in to comment.