diff --git a/test/common/markdown/markdown-link.tests.ps1 b/test/common/markdown/markdown-link.tests.ps1 index 988fa3865f..3dca8b02af 100644 --- a/test/common/markdown/markdown-link.tests.ps1 +++ b/test/common/markdown/markdown-link.tests.ps1 @@ -111,10 +111,10 @@ Describe "Verify Markdown Links" { { $null = Invoke-WebRequest -uri $url -RetryIntervalSec 10 -MaximumRetryCount 6 } - catch + catch [Microsoft.PowerShell.Commands.HttpResponseException] { if ( $allowedFailures -notcontains $_.Exception.Response.StatusCode ) { - throw "retry of URL failed with error: $($_.Exception.Message)" + throw "Failed to complete request to `"$url`". $($_.Exception.Message)" } } }