Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
drsharp opened this issue Mar 15, 2017 · 1 comment
Assignees

Comments

@drsharp
Copy link

drsharp commented Mar 15, 2017

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!

@roeeba
Copy link
Collaborator

roeeba commented Mar 23, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants