DiamondLightSource / DiamondLightSource/blueapi
Improve error message when config files aren't valid
Open
c: cli
- Dominant language
- Python
- Stars
- 13
- Forks
- 13
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 25
Description
If a config file passed to the CLI is not valid, the user gets a stacktrace instead of an error message
```
$ uv run blueapi -c pyproject.toml controller plans
Traceback (most recent call last):
<...>
File "/dls/athena/blueapi/.venv/lib/python3.11/site-packages/yaml/parser.py", line 171, in parse_document_start
raise ParserError(None, None,
yaml.parser.ParserError: expected '', but found ''
in "pyproject.toml", line 2, column 1
```
Most of this is noise with only the filename, line and column being vaguely relevant.
## Acceptance Criteria
- User error is useful when config file isn't
Contributor guide
Assessment
This issue has not been assessed yet.