Skip to content

Debug Toolchain Template Issues

Jasmeet Singh edited this page Oct 30, 2017 · 9 revisions

Debug Template errors by adding nocreate query parameter to the URL

nocreate: Loading the page with nocreate in the query will disable the Create button. Instead of creating the toolchain, the page will log the POST body to the browser's JavaScript console. this parameter is useful for debugging.

Template Errors are logged to js console

When the toolchain setup page fails to load because there's a YAML error in the template repo, the user can open the browser JS console and see the error message there.

There's a hierarchy of different types of authoring problems that template authors can encounter:

  1. The template repo or branch doesn't exist (err codes NOT_FOUND, INVALID_REPO_URL).
  2. The template repo is hosted on GitHub Enterprise (GHE) and the repo URL is missing GHE credentials (Personal Access Token)(err code UNAUTHORIZED_REPO.
  3. The toolchain.yml file contains a YAML parse error (INVALID_TEMPLATE).
  4. The YAML is well formed, but the template does not conform to the JSON schema. (INVALID_TEMPLATE)
    • This can happen when there are incorrect $ref's, missing required properties, etc.

When a level 3 error occurs, the server returns the data structure that failed validation.

Then we log it in the browser JS console, so that the author can inspect it and hopefully diagnose the problem.

Clone this wiki locally