googleplay-api icon indicating copy to clipboard operation
googleplay-api copied to clipboard

Failed download requests are uncaught

Open babakks opened this issue 4 years ago • 0 comments

In _deliver_data() method, the download request could fail. In a real world example we got a 503 status code (i.e., The service you requested is not available yet.), but it didn't get caught and, as you might have guessed, we persisted the HTML error response instead of an APK file.

As a solution, raising an exception is not a bad idea, is it? We could also return the status code but that would just involve the caller in handling things like that.

Of course, multiple retries (with delays in between) could be a good fix, with or without changing the current behavior of the method.

babakks avatar May 19 '20 11:05 babakks