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

Offen
#244 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@gtmax arbeitet bereits daran.

Seit 23.3.2017.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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!

Vorherrschende Sprache
Ruby
Sterne
420
Forks
282
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus cloudinary/cloudinary_gem

Alle Issues in cloudinary/cloudinary_gem

Ähnliche Issues

Weitere Issues zu Ruby

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.