Skip to content

backend: Improve error handling; frontend: Display error in tooltip - #291

Merged
EpicEric merged 12 commits into
bluerobotics:masterfrom
EpicEric:error-recovery
Sep 23, 2026
Merged

EpicEric merged 12 commits into
bluerobotics:masterfrom
EpicEric:error-recovery

Conversation

@EpicEric

@EpicEric EpicEric commented Sep 22, 2026

Copy link
Copy Markdown
Member

Closes #290


Device disconnected:

2026-09-21T15-08-27

Device reconnected on a different port:

2026-09-22T09-03-21

EnableContinuousMode recovery has also been fixed (i.e. sending a stop signal before restarting the actor) but there's no good way to display that flow via screenshots

The upstream PingError only derives Debug, so a device timeout reaches the user as a nested Debug chain. Map each variant to a sentence.
Give ManagerError and DeviceStatus a Display so callers can show a readable sentence instead of a Debug chain.
@EpicEric
EpicEric force-pushed the error-recovery branch 2 times, most recently from 539d6de to dfc197e Compare September 22, 2026 16:34
@rafaellehmkuhl

Copy link
Copy Markdown
Member

@EpicEric I asked @joaoantoniocardoso to help us with the code reviewing while Patrick is out.

@joaoantoniocardoso joaoantoniocardoso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi, I'm not familiar with the codebase anymore, but here's some quick review.

Comment thread ping-viewer-next-frontend/src/ping-device/utils/device-status.js
Comment thread src/device/manager/mod.rs
Comment thread src/device/manager/mod.rs Outdated
…ing the device

Leave the map entry as Available so a later recover can reopen the source and respawn the actor.
…sMode

Tear down the dead runtime and reuse auto-create so a user retry can bring the actor back instead of returning DeviceStatus(Error).

Stop continuous streaming before teardown. Aborting alone left Ping devices streaming on the BlueOS bridge, so the next handshake timed out while BlueOS still showed the sensor as connected.
Retry recreate with exponential backoff so a flaky link can come back without waiting for a UI click, while EnableContinuousMode still recovers immediately.
… Error

Surface subscriber, actor, and timeout dead ends through mark_error so auto-heal can retry instead of skipping the device forever.
The backend serializes Error as a tagged object, so a shared helper is needed to derive the chip kind, colour, and reason.
A device in Error was falling through to the Available chip, hiding why it stopped.
A device in Error was falling through to the Available chip, hiding why it stopped.
A device in Error was falling through to the Available chip, hiding why it stopped.
A device in Error was falling through to the Available chip, hiding why it stopped.
@EpicEric
EpicEric merged commit cbddc9f into bluerobotics:master Sep 23, 2026
14 checks passed
@EpicEric
EpicEric deleted the error-recovery branch September 23, 2026 20:40
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.

Device does not initiate when it shows as error in the device menu

3 participants