Skip to content

Shifting error handling into the library #4

@instanceofMA

Description

@instanceofMA

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions