webp-convert icon indicating copy to clipboard operation
webp-convert copied to clipboard

Prevent that WPC encounters the same problem over and over again

Open rosell-dk opened this issue 5 years ago • 0 comments

WPC might fail in different ways.

Problematic file / filename: It might be that a file is corrupt, too large or perhaps the filename contains characters that gives problems. Such problems results in a response that has a json object with errorCode and errorMessage properties. It must be prevented that Wpc uploads the same problematic file over and over again. We should set a timeout for that file and double that upon next failure.

** invalid api key ** In that case, we should deny future attempts with that key.

** server not responding ** In that case, for automated conversions, such as those triggered with webp-on-demand, we should set a timeout. If same error occurs on next attempt, double the timeout!

curl_exec might fail

Something else than an image is returned For example it has been experienced that a 406 is send along with HTML saying that the request was denied. Again: timeout. Maybe both for image and for converter

rosell-dk avatar Jun 13 '19 16:06 rosell-dk