What a failed call resolves with. Every generated XxxResponse is XxxSuccess | ApiFailure,
so check success before reading the result fields.
A few methods add fields of their own to the failure, such as candidates on
MENU_MATCH_AMBIGUOUS or the window state after a failed window call. Test for them with
in ('candidates' in r) and check the value before use.
What a failed call resolves with. Every generated
XxxResponseisXxxSuccess | ApiFailure, so checksuccessbefore reading the result fields.A few methods add fields of their own to the failure, such as
candidatesonMENU_MATCH_AMBIGUOUSor the window state after a failed window call. Test for them within('candidates' in r) and check the value before use.