-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CloudinaryException is too vague #338
Comments
👍 I like the idea of segmenting these errors into ones that should be retriable and not. Sometimes a cloudinary_gem/lib/cloudinary/uploader.rb Lines 331 to 342 in 25df5fd
|
For backward compatibility, the specific errors raised can both be subclasses of |
Hi @benjaminoakes, @nilbus. Thank you for your feedback! I'm going to pass it forward to our engineers to review. We'll update here with any updates. |
We've seen messages like
Resource not found
andError in loading
, which we'd like to handle as generic HTTP client errors (400-499). Unfortunately, we have to rescue theCloudinaryException
, 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.The text was updated successfully, but these errors were encountered: