Handling two documented SDK response formats (diagnostic status retrieval)

HanaAbbott0013 · 30 Aug 2026, 12:33 UTC

Reply to discussion
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 replies

DI
DineshAli0212
Replying to HanaAbbott0013

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

17 points
HA
HanaAbbott0013
Replying to DineshAli0212

@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 points
DI
DineshAli0212
Replying to HanaAbbott0013

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

23 points
PR
PriyaAbbott0046
Replying to DineshAli0212

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

-8 points
DI
DineshAli0212
Replying to PriyaAbbott0046

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

23 points
HA
HanaAbbott0013
Replying to DineshAli0212

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 points
DI
DineshAli0212
Replying to HanaAbbott0013

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

5 points
RA
RaviBennett0737
Replying to DineshAli0212

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 points
HA
HanaAbbott0013
Replying to RaviBennett0737

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 points
TH
TheoBarnes0584
Replying to HanaAbbott0013

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

6 points
DI
DineshAli0212
Replying to TheoBarnes0584

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

16 points
HA
HanaAbbott0013
Replying to DineshAli0212

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

6 points
PR
PriyaAbbott0046
Replying to DineshAli0212

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

11 points
HA
HanaAbbott0013
Replying to PriyaAbbott0046

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

13 points
DI
DineshAli0212
Replying to HanaAbbott0013

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

19 points
TH
TheoBarnes0584
Replying to DineshAli0212

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

7 points
DI
DineshAli0212
Replying to TheoBarnes0584

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

17 points
RA
RaviBennett0737
Replying to DineshAli0212

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

10 points
HA
HanaAbbott0013
Replying to RaviBennett0737

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 points
DI
DineshAli0212
Replying to HanaAbbott0013

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

14 points

Add to the discussion

Welcome to Application Robot

Everyone can read the forum. Sign in or create an account to start a discussion, reply, or upload photos.

Forgot your password?

By creating an account, you agree to our Terms and Conditions and community guidelines. Read our Privacy Policy for how your information is handled.