You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's in nature of device's duplex connection with the Grandeur Cloud which we can take to our advantage and shift the errors code checking into the library instead of letting the user handle them.
Every function (getSummary, setSumary, getParms, setParms) sends deviceID and some related data to the cloud. Since the deviceID is already validated while the establishment of connection, DEVICE-ID-INVALID error won't occur. The only other error that can occur is SERVER-ERROR which is a server-side error and client has nothing to do with it.
Therefore, we can easily do the these errors code handling in the library and return only the data after stripping off the code and message. This would minimize user's headache and make its development much more seamless.
The text was updated successfully, but these errors were encountered:
We don't have to do anything. Just add error code checking on receiving the
message.
And we can pass two variables to callback, error and result. And we do the
same thing that we do in javascript. If there is an error, we return error
code in error argument with response undefined. If we have no error, we can
return it in response with error 0.
It's in nature of device's duplex connection with the Grandeur Cloud which we can take to our advantage and shift the errors code checking into the library instead of letting the user handle them.
Every function (getSummary, setSumary, getParms, setParms) sends deviceID and some related data to the cloud. Since the deviceID is already validated while the establishment of connection,
DEVICE-ID-INVALID
error won't occur. The only other error that can occur isSERVER-ERROR
which is a server-side error and client has nothing to do with it.Therefore, we can easily do the these errors code handling in the library and return only the data after stripping off the code and message. This would minimize user's headache and make its development much more seamless.
The text was updated successfully, but these errors were encountered: