Fix saveProject TypeError on network errors - #4311
Open
dyk1454683243-sudo wants to merge 3 commits into
Open
dyk1454683243-sudo wants to merge 3 commits into
dyk1454683243-sudo wants to merge 3 commits into
Conversation
Guard both saveProject catch handlers so a missing error.response no longer throws when reading status or data. Network failures now run the normal save-failure path (end saving, toast, projectSaveFail). Fixes processing#4276 Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
|
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. |
This was referenced Sep 20, 2026
Closed
clairep94
approved these changes
Oct 2, 2026
clairep94
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for this! @dyk1454683243-sudo could you rebase and tag me? ready to merge after
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused fix correctly covers both save paths with appropriate regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes network-error handling during project saves so failures follow the normal toast and failure-action path.
Changes:
- Safely handles missing Axios responses for PUT and POST saves.
- Adds coverage for network, 403, and 409 failures.
| File | Description |
|---|---|
client/modules/IDE/actions/project.js |
Guards access to optional error responses. |
client/modules/IDE/actions/project.unit.test.js |
Tests save-failure behavior and existing modal handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
Fixes #4276
When
saveProjectfails with a network error, Axios rejects withouterror.response. Both the update (PUT) and create (POST).catchhandlers then threwTypeErroronresponse.status/response.datainstead of running the normal save-failure path.This is a fresh PR from current
develop. Prior closed unmerged attempt: #4304.Demo:
No UI change. Network save failures now keep the existing failure toast /
projectSaveFailbehavior instead of an unhandled rejection.Changes:
response?.statusandresponse?.datain bothsaveProjectcatch blocks (client/modules/IDE/actions/project.js).error.response === undefinedon update and create, and keep 403 / 409 modal behavior covered (client/modules/IDE/actions/project.unit.test.js).I have verified that this pull request:
npm run lint)npm run test)npm run typecheck)developbranch.Fixes #4276