cml
cml copied to clipboard
Add documentation links and helpful descriptions to error messages
p1
The following have recently been documented in https://cml.dev/doc, but should also have better CLI errors pointing to said docs:
- [ ] #888
- https://cml.dev/doc/ref/send-comment#GitHub
- [ ] #880
uses: actions/checkout@v3, with.ref: ${{ github.event.pull_request.head.sha }}- https://cml.dev/doc/usage?tab=GitHub
- [ ] #941
- use default
GITHUB_TOKENorGitHub App token, notPersonal Access Token - https://cml.dev/doc/ref/send-github-check
- use default
- [ ] #595
- [ ]
Resource not accessible by integration - [ ]
Error: Forbidden- "Ensure permissions are granted as per https://cml.dev/doc/self-hosted-runners?tab=GitLab#personal-access-token"?
- [ ]
- [ ] #911 (?)
- [x] #628
- [x] #563
- [x] #472
- [x] #813
- [x] #816
- [x] #835
p2
- [ ] #581/r656156462: links like
https://err[or].cml.dev/YpQon errors that are especially tricky to explain inline or require additional context [...] e.g. https://error.dvc.org/no-dvc-cache - [x] #1222
cml CMD --helplinks tohttps://cml.dev/doc/ref/CMD
See also
- #595/862336393: See #563 and #563/r640709086 for a good compromise between error message integrity and end user helpfulness.
try {
operation();
} catch (error) {
if (error.message === 'Obscure error')
error.message += ', please try toggling the "more magic" switch';
throw error;
}
Linking to #628, #595, #563 and #472 for future references.
Also
super minor: maybe newline instead of
', '
Now that we have https://github.com/iterative/cml.dev/pull/112, can we also add a https://cml.dev/doc/ref/subcommand link to all subcommand --help output like DVC does? #1222
Meanwhile error messages can link to subsections of the command reference for elucidation.