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

Aberta
#244 1 comentário 0 reações 1 responsável Ver no GitHub

@gtmax já está trabalhando nisso.

Desde 23/3/2017.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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!

Linguagem predominante
Ruby
Estrelas
420
Forks
282
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de cloudinary/cloudinary_gem

Todas as issues de cloudinary/cloudinary_gem

Issues semelhantes

Mais issues de Ruby

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.