cml icon indicating copy to clipboard operation
cml copied to clipboard

Add documentation links and helpful descriptions to error messages

Open 0x2b3bfa0 opened this issue 4 years ago • 3 comments

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_TOKEN or GitHub App token, not Personal Access Token
    • https://cml.dev/doc/ref/send-github-check
  • [ ] #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/YpQ on 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 --help links to https://cml.dev/doc/ref/CMD

See also

try {
  operation();
} catch (error) {
  if (error.message === 'Obscure error')
    error.message += ', please try toggling the "more magic" switch';
  throw error;
}

0x2b3bfa0 avatar Jun 22 '21 21:06 0x2b3bfa0

Linking to #628, #595, #563 and #472 for future references.

0x2b3bfa0 avatar Jun 22 '21 21:06 0x2b3bfa0

Also

super minor: maybe newline instead of ', '

casperdcl avatar Jul 01 '21 20:07 casperdcl

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.

casperdcl avatar Oct 01 '21 20:10 casperdcl