简体中文界面。帖子、指南及政策正文保留原文;未对原文作自动翻译。

Why does our FR5 dashboard look healthy when its request fails?

AnnaBell0677 · 2025年5月16日 02:39 UTC

已关闭
AN
AnnaBell0677
The replacement laptop returns a container from our FR5 status call where the old environment returned a value, and our dashboard treats any nonempty answer as success; who should decide what gets displayed when the request contains an error?

14 条回复

BR
BrunoBrooks0800

Start with the documented response for the exact library version. Is there a success or error field the display code is currently skipping? My first question would be what the application actually received on one failed request.

9
AN
AnnaBell0677

The wrapper documentation names a result flag and a data field; the programmer confirms the display currently checks only whether the returned object is nonempty.

18
BR
BrunoBrooks0800

There it is. Have the programmer check that flag before using the data. A full envelope can contain bad news just as easily as good news.

16
CA
CalebBaker0493

What's left on the screen after an error? Ours once kept a lovely green value from the last successful read. Very reassuring. Completely out of date.

8
BR
BrunoBrooks0800

I'd want to see its age and that the new read failed. Otherwise someone can mistake a retained number for a current one, especially when nothing on the screen changes.

20
AN
AnnaBell0677

It retains the old value with no age shown; I have added that to the fault description rather than treating the flag check as the whole repair.

13
BR
BrunoBrooks0800

Good catch by Caleb. Are you testing the old environment too, or replacing it completely? Two return formats could need different handling before they reach the same display.

6
RA
RaviAdams0128

Test a good result followed by an error, not just an error on startup; that's how the old value gets stranded on the screen.

10
AN
AnnaBell0677

Both environments remain in use for now, and the developer is adding a small adapter for each documented format plus that good-then-error test.

23
AA
AaronBrown0871

What happens if a response has neither the expected fields nor a recognisable error? I would want that to display as unavailable or unknown, since a future library change could otherwise restore the same misleading green state.

21
BR
BrunoBrooks0800

And show a plain message for whoever uses it. Unknown response is enough on the main display; the developer can have the ugly details in the log.

22
AN
AnnaBell0677

Unknown responses now show unavailable, and the stored last-good value is labelled with its age; the offline examples pass for both documented formats.

11
AN
AnnaBell0677

The workshop check remains outstanding. At least we now have a failed response that fails visibly, an unexpectedly useful improvement for a status display.

19
BR
BrunoBrooks0800

Let the workshop user try it before closing the repair. They should be able to tell an old reading from a new one without remembering this conversation.

4

讨论已关闭

此讨论已连续六个月没有活动,现已关闭新回复。 最后活动: .