cloudinary_gem icon indicating copy to clipboard operation
cloudinary_gem copied to clipboard

Why aren't RestClient::RequestTimeout exceptions caught and re-raised as CloudinaryExceptions?

Open drsharp opened this issue 8 years ago • 1 comments

The call_api method only raises CloudinaryExceptions under certain circumstances, like JSON parse errors or certain failure codes. But if the underlying RestClient times out, it's not caught so it bubbles out to the calling code.

https://github.com/cloudinary/cloudinary_gem/blob/master/lib/cloudinary/uploader.rb#L293-L308

Is this an oversight or intentional?

It's nice to only think about the Cloudinary API when coding and not have to worry about libraries that Cloudinary uses (like RestClient).

I'd be happy to submit a PR on this, but I wanted to start with a question to see if I'm not understanding the rationale here. Thanks!

drsharp avatar Mar 15 '17 04:03 drsharp

Hi @drsharp, thank you for reporting this. We will fix this issue on our next major version of the Gem. We will share an ETA once we'll have one.

roeeba avatar Mar 23 '17 12:03 roeeba