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

Handling two documented SDK response formats (diagnostic status retrieval)

HanaAbbott0013 · 2026年8月30日 12:33 UTC

回复讨论
HA
HanaAbbott0013
Our dashboard for diagnostic status retrieval on Fairino FR10 expected a status value from the old SDK. The replacement environment returns a container with extra information, and our screen now shows a plausible status even when a request fails. This is in a training cell with a read-only dashboard, with a sample housing as a reference. I'm trying to fix how we interpret the answer.

20 条回复

DI
DineshAli0212

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

17
HA
HanaAbbott0013

@DineshAli0212 I've checked our saved examples. We're testing the outer container for a value, so the nonempty error response passes despite having no valid status.

0
DI
DineshAli0212

Replay both offline with a version-specific parser. Failure should return unavailable. That pair should cover the adapter.

23
PR
PriyaAbbott0046

@DineshAli0212 That covers this bug. What about a transport exception or missing field? Neither has to look like your saved error.

-8
DI
DineshAli0212

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

23
HA
HanaAbbott0013

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

14
DI
DineshAli0212

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

5
RA
RaviBennett0737

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

11
HA
HanaAbbott0013

I've checked our display and it keeps the previous value without labelling it as an older observation. The parsing fix alone wouldn't address that.

11
TH
TheoBarnes0584

Why keep it? Wouldn't clearing an old mode be less confusing?

6
DI
DineshAli0212

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

16
HA
HanaAbbott0013

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

6
PR
PriyaAbbott0046

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

11
HA
HanaAbbott0013

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

13
DI
DineshAli0212

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

19
TH
TheoBarnes0584

What if the optional details are empty but the status is valid? Could strict parsing incorrectly turn that into unavailable?

7
DI
DineshAli0212

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

17
RA
RaviBennett0737

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

10
HA
HanaAbbott0013

I've got an answer to the design question: parse the documented status for the identified SDK and keep failures unavailable. I'll call the display fix complete only when our offline examples show that behaviour on screen.

3
DI
DineshAli0212

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

14

参与讨论

欢迎来到 Application Robot

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

忘记密码?

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