How to use the @kui-shell/plugin-editor.fetchFile function in @kui-shell/plugin-editor

To help you get started, we’ve selected a few @kui-shell/plugin-editor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IBM / kui / plugins / plugin-openwhisk-editor-extensions / src / lib / cmds / new.ts View on Github external
.catch(err => {
      debug('fetchAction error', err.statusCode, err.code, err.message)
      if (tryLocal && err.code !== 406) {
        // 406 means that this is a valid action, but lacking composer source
        return fetchFile(name)
      } else {
        throw err
      }
    })
}