gome-assistant icon indicating copy to clipboard operation
gome-assistant copied to clipboard

Error handling?

Open rubenv opened this issue 2 years ago • 3 comments
trafficstars

I know error handling in Go is verbose, but I'm amazed by the lack of errors in many places here.

For instance, calling a service does not return any indication on whether or not it succeeded? How are errors notified / should they be handled?

Apart from that: brilliant library, thanks a lot!

rubenv avatar Mar 04 '23 19:03 rubenv

I'm amazed by the lack of errors in many places here

Simply because I got the happy path working first for a hobby project 😜

You're right, service/state calls should return an Error, which of course can just be ignored for users who don't care.

saml-dev avatar Mar 04 '23 22:03 saml-dev

Simply because I got the happy path working first for a hobby project stuck_out_tongue_winking_eye

Oh yes that makes total sense.

Question is: would you accept PRs that add that, even if they were to break API compatibility?

rubenv avatar Mar 06 '23 08:03 rubenv

Yeah for sure, I'll accept PRs. I'm okay with breaking changes right now. But this particular change could return an Error from various service/state calls and not be a breaking change since callers don't have to capture it in a var if they don't care.

saml-dev avatar Mar 10 '23 01:03 saml-dev