kyleboe / zoom_rb

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

Incorrect key mapping from bad response payload to error handling method #477

Open frankhock opened 1 month ago

frankhock commented 1 month ago

Hello! first of all thanks to everyone who took the time to write this gem!

I'm trying to understand if this is a bug, or a detail I don't fully understand.

Below is the response I'm receiving from zoom when refreshing an expired token fails. I noticed the response does not include a code key, but the raise_error util method expects one?

CleanShot 2024-10-09 at 12 31 23@2x

https://github.com/kyleboe/zoom_rb/blob/main/lib/zoom/utils.rb#L14

def raise_error(response, http_code=nil)
        code = response['code']
        message = response['message']
        errors = response['errors']

        case http_code
        ...
end