In case of a failed integrity check in Dataset.load() we get a misleading error message:
RuntimeError: downloading resource tgd9q/ failed for all mirrors.
The original error message when failing download_file() is:
RuntimeError: File {filepath} not found or download corrupted.
Description of a solution
calling download_file() in download_dataset() can fail due to several reasons, but failing to download and failing to check integrity both result in a RuntimeError.
By raising a different type of exception on failing integrity checking, this could be handled better.
An alternative without changing download_file() would be to forward the error message from download_file() somehow. This would probably be the best solution.
Minimum acceptance criteria
[ ] raise more fitting error message in case of a failed integrity check
Description of the problem
In case of a failed integrity check in
Dataset.load()
we get a misleading error message:The original error message when failing
download_file()
is:Description of a solution
calling
download_file()
indownload_dataset()
can fail due to several reasons, but failing to download and failing to check integrity both result in aRuntimeError
.By raising a different type of exception on failing integrity checking, this could be handled better.
An alternative without changing
download_file()
would be to forward the error message fromdownload_file()
somehow. This would probably be the best solution.Minimum acceptance criteria