From 08d6be90397e382c808dbc347b8e4ae459239f53 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Fri, 3 Jan 2020 18:40:27 +0000 Subject: [PATCH] Include url in the markdown-links test error message (#11438) --- test/common/markdown/markdown-link.tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)" } } }