Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public async Task DownloadFileAsyncFailsForInValidUrlTest(HttpStatusCode httpSta
"1234",
"test.txt",
path));
Assert.Contains($"Failed to download local file '{path}' after {publishTask.RetryHandler.MaxAttempts} attempts. See inner exception for details,", actualError.Message);
Assert.Contains($"Failed to download local file '{path}' after {publishTask.RetryHandler.MaxAttempts} attempts. See inner exception for details.", actualError.Message);
}

[Theory]
Expand Down Expand Up @@ -259,7 +259,7 @@ public async Task DownloadFailureWhenStatusCodeIsInvalid(HttpStatusCode httpStat
"1234",
"test.txt",
path));
Assert.Contains($"Failed to download local file '{path}' after {publishTask.RetryHandler.MaxAttempts} attempts. See inner exception for details,", actualError.Message);
Assert.Contains($"Failed to download local file '{path}' after {publishTask.RetryHandler.MaxAttempts} attempts. See inner exception for details.", actualError.Message);
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ public async Task DownloadFileAsync(

return true;
}
catch (Exception toStore) when (toStore is HttpRequestException || toStore is TaskCanceledException || toStore is SocketException)
catch (Exception toStore)
{
mostRecentlyCaughtException = toStore;
return false;
Expand All @@ -967,7 +967,7 @@ public async Task DownloadFileAsync(
if (!success)
{
throw new Exception(
$"Failed to download local file '{path}' after {RetryHandler.MaxAttempts} attempts. See inner exception for details, {mostRecentlyCaughtException}");
$"Failed to download local file '{path}' after {RetryHandler.MaxAttempts} attempts. See inner exception for details.", mostRecentlyCaughtException);
}
}

Expand Down