Skip to content

Conversation

christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Sep 19, 2025

Summary

  • Fixes Sentry issue CLOUD-FRONTEND-STAGING-29 (TypeError: nodes is not iterable)
  • Adds defensive guard to check if nodes is valid array before iteration
  • Gracefully handles malformed workflow data by skipping node processing

Root Cause

The collectMissingNodesAndModels function in src/scripts/app.ts:1135 was attempting to iterate over nodes without checking if it was a valid iterable, causing crashes when workflow data was malformed or missing the nodes property.

Fix

Added null/undefined/array validation before the for-loop:

if (\!nodes || \!Array.isArray(nodes)) {
  console.warn('Workflow nodes data is missing or invalid, skipping node processing', { nodes, path })
  return
}

Fixes CLOUD-FRONTEND-STAGING-29

┆Issue is synchronized with this Notion page by Unito

…esAndModels

Fixes CLOUD-FRONTEND-STAGING-29

Add null/undefined check before iterating over nodes in collectMissingNodesAndModels
to prevent "TypeError: nodes is not iterable" when workflow data is malformed.
The function now gracefully skips processing when nodes data is invalid.
@christian-byrne christian-byrne requested a review from a team as a code owner September 19, 2025 06:00
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Sep 19, 2025
Copy link

github-actions bot commented Sep 19, 2025

🎭 Playwright Test Results

All tests passed!

⏰ Completed at: 09/19/2025, 06:22:11 AM UTC

📈 Summary

  • Total Tests: 450
  • Passed: 421 ✅
  • Failed: 0
  • Flaky: 0
  • Skipped: 29 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 414 / ❌ 0 / ⚠️ 0 / ⏭️ 29
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@christian-byrne christian-byrne changed the title [bugfix] Fix TypeError: nodes is not iterable in collectMissingNodesAndModels fix TypeError: nodes is not iterable in collectMissingNodesAndModels Sep 19, 2025
@christian-byrne christian-byrne changed the title fix TypeError: nodes is not iterable in collectMissingNodesAndModels fix TypeError: nodes is not iterable when loading graph Sep 19, 2025
DrJKL
DrJKL previously approved these changes Sep 19, 2025
@christian-byrne christian-byrne merged commit 80d75bb into main Sep 19, 2025
21 checks passed
@christian-byrne christian-byrne deleted the fix/cloud-frontend-staging-29-nodes-not-iterable branch September 19, 2025 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:workflows size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants