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

Aperta
#244 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@gtmax ci sta già lavorando.

Dal 23/3/2017.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement

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!

Lingua principale
Ruby
Stelle
420
Fork
282
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudinary/cloudinary_gem

Tutte le issue di cloudinary/cloudinary_gem

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.