As per the issues #458, #466 errors can occur when attempting to determine a files size but these are not propagated to the download-manager in a meaningful way. At the moment any errors result in a 0 size. This size is then determined to be unknown which then is translated into a network error which automatically schedules a retry, but it might not be something we can recover from 😬
Solution
Introduce a FileSizeResult that represents either a FileSize or a String errorMessage. All calls to check the size that should result in a meaningful failure now emit an error status, instead of being transformed to a network error.
Problem
As per the issues #458, #466 errors can occur when attempting to determine a files size but these are not propagated to the
download-manager
in a meaningful way. At the moment any errors result in a0
size. This size is then determined to beunknown
which then is translated into anetwork error
which automatically schedules a retry, but it might not be something we can recover from 😬Solution
Introduce a
FileSizeResult
that represents either aFileSize
or aString errorMessage
. All calls to check the size that should result in a meaningful failure now emit an error status, instead of being transformed to a network error.