Skip to content

Commit

Permalink
Merge pull request #75 from taschmidt/master
Browse files Browse the repository at this point in the history
Fix bug to show missing transition target errors
  • Loading branch information
ChristopheBougere authored Jun 4, 2021
2 parents 0fa8132 + 4d9e79d commit 85467fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const checkJsonPath = require('./lib/json-path-errors');
const missingTransitionTarget = require('./lib/missing-transition-target');

function formatError(e) {
return e.Code ? `${e.Code}: ${e.Message}` : e.message;
const code = e.Code ? e.Code : e['Error code'];
return code ? `${code}: ${e.Message}` : e.message;
}

function validator(definition) {
Expand Down

0 comments on commit 85467fd

Please sign in to comment.