CloudinaryException is too vague

未關閉
#338 3 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
ruby
領域
api, backend

研究方向

找出 CloudinaryException,以及目前會產生 "Resource not found" 和 "Error in loading." 等訊息的 HTTP 回應處理邏輯。追蹤 400–499 回應如何分類,接著定義例外階層,並驗證相關的用戶端錯誤是否可以分別擷取。此 issue 未提及特定檔案或測試,因此應先找出現有的例外與 HTTP 用戶端測試涵蓋範圍。

由索引模型根據 Issue 內容生成。

描述

enhancement

We've seen messages like Resource not found and Error in loading, which we'd like to handle as generic HTTP client errors (400-499). Unfortunately, we have to rescue the CloudinaryException, check its error message, and then determine what should be done.

I would propose having more than one exception class to make it possible for us to rescue something like Cloudinary::HttpClientError to ignore errors like HTTP 403 (Forbidden), 404 (Not Found), 408 (Request Timeout), etc.

One way to do this would be to add class Cloudinary::HttpClientError < CloudinaryException; end and then use that error for the cases that represent HTTP 400-499.

主要語言
Ruby
星號
420
分支
282
PR 合併指標
30 天內沒有已合併 PR

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

cloudinary/cloudinary_gem 的其他 Issue

查看 cloudinary/cloudinary_gem 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。