kyleboe / zoom_rb

Ruby REST API Wrapper for zoom.us API
https://developers.zoom.us/docs/api/
MIT License
83 stars 104 forks source link

KMP-3014: improve error generation #429

Closed Tekkon closed 2 years ago

Tekkon commented 2 years ago

It's hard to handle errors generated by the gem in the App which uses it because the errors are too common. There is only Zoom::AuthenticationError and Zoom::Error for any other cases.

This PR improves error generation. The error classes added for common http codes. https://marketplace.zoom.us/docs/api-reference/error-definitions is used for reference.

tjefferson08 commented 2 years ago

Isn't this a breaking change? If I have rescue Zoom::Error in my codebase, raising these new, granular errors will no longer be caught (since they don't inherit from Zoom::Error)

(do I have that right?)

kyleboe commented 2 years ago

@tjefferson08 you're totally right. Apologies if this caused any disruption. I opened up #435 with a couple smoke tests to ensure we are descending from Zoom::Error. Thanks for catching this.

tjefferson08 commented 2 years ago

Thanks for the quick response & repair! 🥇

kyleboe commented 2 years ago

@tjefferson08 to close the loop on this, the fix is included in 1.1.4