cloudinary / cloudinary/cloudinary_gem

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

Aperta
#244 1 commento 0 reazioni 1 assegnatario Rivendicata da @gtmax Vedi su GitHub
enhancement
Lingua principale
Ruby
Stelle
420
Fork
285
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.