Connect device through proxy and override http status of the response to any of the files which is going to be downloaded to 404 (for example);
Start downloading.
Expected: Once file for which the response code has been overridden starts downloading it fails with Error status.
Actual: Once file for which the response code has been overridden starts downloading it fails with WaitingForNetwork status.
This issue also leads to network recovery mechanism being applied whenever download fails not due to the lack of connection.
It also doesn't allow to implement different client logic based on the reason of a failure as it is unclear if it is a network issue or a backend one. For example remove download from queue if backend error happens and retry if network connection is missing. Both scenarios will lead to WaitingForNetwork state, which doesn't let distinguish between them.
Steps to reproduce:
Expected: Once file for which the response code has been overridden starts downloading it fails with Error status. Actual: Once file for which the response code has been overridden starts downloading it fails with WaitingForNetwork status.
This issue also leads to network recovery mechanism being applied whenever download fails not due to the lack of connection.
It also doesn't allow to implement different client logic based on the reason of a failure as it is unclear if it is a network issue or a backend one. For example remove download from queue if backend error happens and retry if network connection is missing. Both scenarios will lead to WaitingForNetwork state, which doesn't let distinguish between them.