Skip to content

Propagate backend errors up to popup - #31

Merged
urfeex merged 4 commits into
UniversalRobots:masterfrom
urfeex:popup
Aug 7, 2026
Merged

Propagate backend errors up to popup#31
urfeex merged 4 commits into
UniversalRobots:masterfrom
urfeex:popup

Conversation

@urfeex

@urfeex urfeex commented Jul 23, 2026

Copy link
Copy Markdown
Member

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 status


Note

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 status in the JSON body. RequestProgram.send_command no longer wraps all failures in a generic connectivity message; receive timeouts raise TimeoutError and empty responses use clearer error text so the API layer can classify them.

On the frontend, failed backend fetches include the JSON status in errors shown via validation and script-generation popup. saveNode runs 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.

@urfeex
urfeex marked this pull request as ready for review August 5, 2026 09:10
@urfeex
urfeex requested a review from urrsk August 5, 2026 09:10
Comment thread external-control-backend/src/simple_rest_api.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit a5b9ba2. Configure here.

Comment thread external-control-backend/src/simple_rest_api.py
Comment thread external-control-backend/src/request_program.py
@urfeex
urfeex merged commit e4371b6 into UniversalRobots:master Aug 7, 2026
4 checks passed
@urfeex
urfeex deleted the popup branch August 7, 2026 13:04
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