cloudinary / cloudinary/cloudinary_gem

CloudinaryException is too vague

オープン
#338 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Ruby
スター
420
フォーク
285
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

CloudinaryException と、現在 "Resource not found" や "Error in loading." のようなメッセージを生成している HTTP レスポンス処理を特定します。400–499 レスポンスがどのように分類されているかを追跡し、その後例外階層を定義して、関連するクライアントエラーを個別に捕捉できることを確認します。この issue では具体的なファイルやテストについて言及されていないため、まず既存の例外および HTTP クライアントのテストカバレッジを特定する必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
ruby
領域
api, backend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。