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
dvc.api.params_show
: More helpful error handling
#7926
Comments
The error, in this case, can be avoided. Do you think it would be more useful to return an empty dict or rather raise an exception like |
I think an error in this case? I doubt there's much reason to call What would happen if there was a |
I was thinking about returning an empty dict instead of raising an exception because
The contents of
The |
Good point. I think we err on the side of not throwing errors in the CLI to avoid breaking CI scripts. If you feel the symmetry is important, I think it's fine to return an empty dict. IMO, it's more likely to want an error here, especially for the intended use case of reading stage params into user code. I would much rather break early with a helpful error message than have to debug that |
A warning might be reasonable also, so at least it's not silently returning the empty dict? |
Bug Report
Description
Doesn't show useful errors.
Reproduce
git clone git@github.com:iterative/pipeline-conifguration.git
cd pipeline-conifguration
Expected
I'm guessing it fails because there's no
dvc.yaml
orparams.yaml
in the project root where the shell is started, but the error message doesn't help me understand this or how to fix it.The text was updated successfully, but these errors were encountered: