loop-failure-message.json 1.4 KB

1234567891011121314151617181920212223
  1. {
  2. "name": "verify-loop-failure-says-what-failed",
  3. "nodes": [
  4. {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  5. {"id": "items", "name": "Items", "type": "code", "position": {"x": 0, "y": 100},
  6. "config": {"code": "return { items: ['alpha'] };"}},
  7. {"id": "loop", "name": "Loop", "type": "loop", "position": {"x": 0, "y": 200},
  8. "config": {"inputField": "data.result.items", "continueOnError": false}},
  9. {"id": "boom", "name": "The Node That Broke", "type": "code", "position": {"x": 0, "y": 300},
  10. "config": {"code": "throw new Error('the model refused to load');"}},
  11. {"id": "report", "name": "Report", "type": "code", "position": {"x": 200, "y": 300},
  12. "config": {"code": "return { marker: 'should not run' };"}}
  13. ],
  14. "connections": [
  15. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "items", "targetInput": "data"},
  16. {"sourceNodeId": "items", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"},
  17. {"sourceNodeId": "loop", "sourceOutput": "loop", "targetNodeId": "boom", "targetInput": "data"},
  18. {"sourceNodeId": "loop", "sourceOutput": "done", "targetNodeId": "report", "targetInput": "data"}
  19. ],
  20. "expectStatus": "failed",
  21. "expectExecutionError": "Loop body node \"The Node That Broke\" failed on item 0: Error: the model refused to load",
  22. "expectMissing": ["report"]
  23. }