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.
We've seen messages like
Resource not foundandError 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::HttpClientErrorto 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; endand then use that error for the cases that represent HTTP 400-499.