cli pull
: Print errors instead of panicking when pulling invalid spec files
#753
Labels
bug
Something isn't working
Currently this is what gets logged:
[CLI] ♦ Downloading the project spec (as YAML) from the server. [CLI] ✘ Command failed! [CLI] ✘ Error: Document with errors cannot be stringified at Document.toString (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/@openfn/cli/node_modules/yaml/dist/doc/Document.js:321:19) at extractJobsToDisk (file:///opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/@openfn/cli/node_modules/@openfn/deploy/dist/index.js:626:14) at async pullHandler (file:///opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/@openfn/cli/dist/process/runner.js:1587:25) at async parse (file:///opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/@openfn/cli/dist/process/runner.js:1764:12)
Related to OpenFn/lightning#2446
The YAML parser tracks these errors, can we pretty print them instead? https://eemeli.org/yaml/#errors
The text was updated successfully, but these errors were encountered: