Previously, if an error from the API was returned while polling for updates on a file, it would continue polling. I updated the gem so that it raises a RequestError if the API returns an error status. If not, it raises a RetryError, which is swallowed by the retry gem's with_retries block.
Reproduction Steps
Call Uploadcare::Uploader.upload(file_url) with a file type that Uploadcare says isn't supported (oddly the mimetype on a file I get this message with is audio/mpeg, which should be supported).
There will be no output from the console while the gem continues to poll from_url/status/, which returns an error, such as:
{"status":"error","error":"File validation error: Uploading of these file types is not allowed.","error_code":"DownloadFileValidationFailedError"}
Previously, if an error from the API was returned while polling for updates on a file, it would continue polling. I updated the gem so that it raises a
RequestError
if the API returns an error status. If not, it raises aRetryError
, which is swallowed by the retry gem'swith_retries
block.Reproduction Steps
Uploadcare::Uploader.upload(file_url)
with a file type that Uploadcare says isn't supported (oddly themimetype
on a file I get this message with isaudio/mpeg
, which should be supported).from_url/status/
, which returns an error, such as: