Propagate backend errors up to popup - #31
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
Reviewed by Cursor Bugbot for commit a5b9ba2. Configure here.
urrsk
approved these changes
Aug 7, 2026
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.

This adds bringing information about why fetching the script code didn't work back to the user. This will let the user know whether the port could not be reached, querying data timed out or if an empty response was received.
This builds ontop of #30, hence the draft statusNote
Medium Risk
Changes error-handling paths for robot connectivity and user-facing validation without altering successful fetch logic; misclassified errno or HTTP status could confuse troubleshooting but impact is limited to error messaging.
Overview
Improves visibility when remote script fetch fails by mapping robot connectivity problems to meaningful HTTP responses and surfacing those messages in the URCap UI and generated program popups.
The Flask REST API now returns non-200 statuses (e.g. 504 for timeouts, 503 for unreachable/refused connections with extra guidance on connection refused) while still embedding
statusin the JSON body.RequestProgram.send_commandno longer wraps all failures in a generic connectivity message; receive timeouts raiseTimeoutErrorand empty responses use clearer error text so the API layer can classify them.On the frontend, failed backend fetches include the JSON
statusin errors shown via validation and script-generationpopup.saveNoderuns validation after update and opens a confirm dialog when invalid, with new i18n strings for the failure title and message.Reviewed by Cursor Bugbot for commit a14bc5b. Bugbot is set up for automated code reviews on this repo. Configure here.