Skip to content

Commit

Permalink
fix: Print a clearer message when meltano.yml is empty (meltano#7636)
Browse files Browse the repository at this point in the history
* print exception message for empty meltano files

* [pre-commit.ci] auto fixes from pre-commit.ci hooks

for more information, see https://pre-commit.ci

* update docstring

* Update src/meltano/core/error.py

Co-authored-by: Edgar R. M. <edgarrm358@gmail.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Edgar R. M. <edgarrm358@gmail.com>
  • Loading branch information
3 people committed May 2, 2023
1 parent b13afb9 commit 2ce176f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/meltano/core/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,15 @@ class PluginInstallWarning(Exception):
"""Exception for when a plugin optional optional step fails to install."""


class EmptyMeltanoFileException(Exception):
class EmptyMeltanoFileException(MeltanoError):
"""Exception for empty meltano.yml file."""

def __init__(self) -> None:
"""Instantiate the error."""
reason = "Your meltano.yml file is empty"
instruction = "Please update your meltano file with a valid configuration"
super().__init__(reason, instruction)


class MeltanoConfigurationError(MeltanoError):
"""Exception for when Meltano is inproperly configured."""
Expand Down

0 comments on commit 2ce176f

Please sign in to comment.