cloudinary / cloudinary/cloudinary_gem
CloudinaryException is too vague
- Dominant language
- Ruby
- Stars
- 420
- Forks
- 285
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.