andreykaipov / goobs

Go client library for OBS Studio
Apache License 2.0
137 stars 22 forks source link

Improve error when there's an unrecognized message from the server #22

Closed andreykaipov closed 3 years ago

andreykaipov commented 3 years ago

Namely https://github.com/andreykaipov/goobs/blob/v0.7.1/client.go#L206:

panic: idk what kinda message this is lol #19 

See https://github.com/muesli/obs-cli/issues/19. In that case, when there's a client/server version discrepancy.

Ideally we shouldn't panic at all. Not quite sure if the flow makes sense yet, but maybe I can just wrap those errors as events like I do if any other errors in that loop. The client would then properly error when getting the auth required (if any).