Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: TypeError: Cannot read properties of undefined (reading 'data') in autoAnswerableFlag #4033

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak requested a review from a team December 3, 2024 13:23
Copy link

github-actions bot commented Dec 3, 2024

Removed vultr server and associated DNS entries

Copy link
Contributor

@RODO94 RODO94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change looks good to me, although I wasn't able to recreate the bug to test it and I couldn't fully understand what Airbrake was telling me.

I could only get that it was happening in a Medway/Article4 service. How did you find the source?

@jessicamcinchak
Copy link
Member Author

jessicamcinchak commented Dec 3, 2024

@RODO94 I use Airbrake's "Backtrace" tab which will often include a function name (often helpful to additionally use the left/right scroll in upper right to toggle through "Occurances" which have been grouped)
Screenshot from 2024-12-03 15-25-23

In this case, these are edge cases of likely-legacy nodes that don't have the same structure as new nodes created today so they're difficult to re-create in the editor directly. Instead by simply reading over the function code, I looked for any instances where data wasn't safely handled and fixed that directly (eg const {type, data, edges} = flow[id] would fail in instances where flow[id] = undefined, so now I'm first confirming that the node still exists in the flow before trying to destructure the node properties.)

@jessicamcinchak jessicamcinchak merged commit bc7a818 into main Dec 3, 2024
12 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/type-error-autoAnswerableFlag branch December 3, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants