Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shifting error handling into the library #4

Open
instanceofMA opened this issue Apr 18, 2020 · 4 comments
Open

Shifting error handling into the library #4

instanceofMA opened this issue Apr 18, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@instanceofMA
Copy link
Contributor

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.

@instanceofMA instanceofMA added the enhancement New feature or request label Apr 18, 2020
@instanceofMA instanceofMA self-assigned this Apr 18, 2020
@instanceofMA
Copy link
Contributor Author

@moizhusnain

@moizhusnain
Copy link
Member

Sounds like a cool idea, what's the plan? I mean how we can push it?

@instanceofMA
Copy link
Contributor Author

instanceofMA commented Apr 18, 2020 via email

@moizhusnain
Copy link
Member

Okay, let's push this. Just make sure it is consistent with JS SDK because it's really important to be consistent.

@instanceofMA instanceofMA added the good first issue Good for newcomers label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants