add download error unit tests.