mesg-foundation / js-sdk

Javascript mono-repo with all the tools to interact with MESG
https://mesg.com
4 stars 4 forks source link

Improve returned errors of process compilation #170

Closed NicolasMahe closed 4 years ago

NicolasMahe commented 4 years ago

The PR https://github.com/mesg-foundation/js-sdk/pull/167 introduce json schema based validation of the process during the compilation. It currently returns too much errors and they are hard to understand. Eg:

$ mesg-cli process:compile process-notvalid.yml
 ›   Error:
 ›   /steps/0 should have required property 'eventKey'
 ›   /steps/0 should have required property 'taskKey'
 ›   /steps/0 should match exactly one schema in oneOf
 ›   /steps/0/type should be equal to one of the allowed values
 ›   /steps/0/type should be equal to one of the allowed values
 ›   /steps/0 should match exactly one schema in oneOf

It will be nice to have more human friendly errors.

antho1404 commented 4 years ago

Issue migrated to liteflow-labs/liteflow-js#21