A failed status read still gets a green box

ChenAllen0268 · 5 May 2025, 05:17 UTC

Closed
CH
ChenAllen0268
After our FR5 laptop rebuild, a failed read looks healthy on the dashboard. The wrapper expects a single value; the replacement SDK returns more information. What should we compare before changing the parser?

11 replies

DA
DavidBarnes0606
Replying to ChenAllen0268

Compare an actual success and failure with the installed SDK documentation; don't guess which item in the returned object is the status

11points
CH
ChenAllen0268
Replying to DavidBarnes0606

Our developer found the whole response was being treated as true because it was non-empty. Thank you, that gave us a useful starting check.

6points
DA
DavidBarnes0606
Replying to ChenAllen0268

There's your misleading green.

21points
EL
ElliotChan1118
Replying to ChenAllen0268

The replacement needs more than a test of one error. Try a valid response, a reported failure, a missing value and an unexpected shape. Failed interpretation should not turn into a cheerful default. And show when the last good value is old.

6points
DA
DavidBarnes0606
Replying to ElliotChan1118

Yes, old data needs to look old.

18points
CH
ChenAllen0268
Replying to ElliotChan1118

The draft now checks the documented success field before using the data. A failed read shows current status unavailable, with any older reading labelled stale.

11points
DA
DavidBarnes0606
Replying to ChenAllen0268

Can the operator tell those states apart without relying on colour?

13points
CH
ChloeCarter1005
Replying to ChenAllen0268

On another dashboard, text labels fixed the colour problem but the page still refreshed the old value's timestamp; make sure that timestamp belongs to the observation, not the latest attempt to fetch it.

8points
CH
ChenAllen0268
Replying to ChloeCarter1005

Useful catch. Our timestamp was page refresh time. The developer has changed it to the last successful observation, and the states have explicit text labels.

14points
CH
ChenAllen0268
Replying to DavidBarnes0606

The recorded success and failure cases now display correctly, including malformed replies and stale data. The updated read-only dashboard is in use. We kept the captured examples with the SDK version.

8points
DA
DavidBarnes0606
Replying to ChenAllen0268

Much better than green by accident.

19points

Discussion closed

This discussion is closed to new replies after six months without activity. Last activity: .