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

Fairino FR10: Our status wrapper reads too much into a container

MeiChan1125 · 2026年7月16日 00:31 UTC

回复讨论
ME
MeiChan1125
I'm fixing our controller availability reporting dashboard for Fairino FR10 in a training cell with a read-only dashboard. Our old SDK returned the status value the wrapper expected; the replacement returns a container with more information. Failed requests can now look like plausible status readings. We use a reference bracket as a reference, but the problem is interpreting the response.

20 条回复

LU
LuisChan1130

Got sanitized success and failure examples? Compare the documented status field with what your wrapper actually reads.

10
ME
MeiChan1125

Found it. We're checking whether the outer container is nonempty. Our error response passes without containing a valid status. Brilliant.

10
LU
LuisChan1130

Start a narrow parser for this version and replay your two examples offline. Return unavailable on failure; those examples should cover the adapter's behaviour.

18
BE
BethBarnes0585

Two examples establish the reported bug, but they don't cover an adapter. A transport exception or missing field isn't necessarily shaped like that saved error.

3
LU
LuisChan1130

Fair point; I overstated coverage. Keep those as the regression, then add documented errors, transport exceptions and malformed replies.

19
ME
MeiChan1125

@LuisChan1130 I'm tempted to show unavailable for all three. Can the screen stay simple while we keep enough detail to tell those failures apart?

5
LU
LuisChan1130

Yes. One unavailable display state, distinct reasons in the result.

21
AN
AnilAbbott0027

My setup kept showing its last successful value when the connection failed. It looked current to people; explicitly marking the current status unavailable made the difference.

18
ME
MeiChan1125

Ours does that too. No old-observation label. Fixing the parser would still leave that misleading value sitting there.

13
HA
HazelAdams0136

Is there a reason to retain the old value at all? Clearing it sounds less confusing for a mode display.

19
LU
LuisChan1130

@HazelAdams0136 You can clear it. Retaining a previous observation only helps if users need it and can see its age separately from current status.

18
ME
MeiChan1125

I'll make our main field unavailable and put any previous observation in labelled diagnostic detail. That seems clearer for this screen.

3
BE
BethBarnes0585

@LuisChan1130 How do you select the parser? Guessing from reply shape brings the same mistake back.

12
ME
MeiChan1125

Both of our environments identify the SDK they load. That gives me an explicit selection input instead of guessing from a response.

21
LU
LuisChan1130

@MeiChan1125 Use those IDs. Reject unknown versions clearly, and don't switch parsers just because an unexpected reply resembles another supported format.

7
HA
HazelAdams0136

Empty optional details, valid status. Would strict parsing reject that too?

5
LU
LuisChan1130

Optional can be absent where the contract allows. Required status must still be valid, however much other content arrives.

11
AN
AnilAbbott0027

My success fixture had empty optional details. Keeping it stopped us tightening validation until perfectly valid answers failed.

12
ME
MeiChan1125

@AnilAbbott0027 I'm closing the adapter design question with explicit version selection and unavailable results for failures. The actual fix still has to pass our offline examples all the way to the display.

16
LU
LuisChan1130

@MeiChan1125 That design addresses the misleading answer directly, and your condition keeps the implementation claim tied to what the screen actually shows.

9

参与讨论

欢迎来到 Application Robot

所有人都可以阅读论坛。登录或注册后即可发起讨论、回复或上传照片。

忘记密码?

注册账号即表示你同意我们的 使用条款 社区准则。请阅读我们的 隐私政策 ,了解我们如何处理你的信息。