Skip to content

Commit 4e52562

Browse files
committed
add error_equals validation #54
1 parent b941a76 commit 4e52562

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/states/edge.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ RetryEdge.prototype.validate = function (cell, res) {
8686
if ((cell.source && cell.target) && (cell.source.id != cell.target.id)) {
8787
res.push("retry edge target MUST be self");
8888
}
89+
if (!cell.getAttribute("error_equals")) {
90+
res.push("error_equals MUST be a non-empty");
91+
}
8992
if (awssfUtils.validateNumber(cell.getAttribute("interval_seconds")) == false) {
9093
res.push("interval_seconds MUST be a positive integer");
9194
}
@@ -137,6 +140,9 @@ CatchEdge.prototype.validate = function (cell, res) {
137140
if (!(cell.source && cell.target)) {
138141
res.push("edge MUST be connected");
139142
}
143+
if (!cell.getAttribute("error_equals")) {
144+
res.push("error_equals MUST be a non-empty");
145+
}
140146
if (awssfUtils.validateJsonPath(cell.getAttribute("result_path")) == false) {
141147
res.push("result_path MUST use only supported jsonpath");
142148
}

0 commit comments

Comments
 (0)