mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add StatusCode to HttpResponseException (#18842)
This commit is contained in:
+1
-1
@@ -816,7 +816,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
/// <param name="message">Message for the exception.</param>
|
||||
/// <param name="response">Response from the HTTP server.</param>
|
||||
public HttpResponseException(string message, HttpResponseMessage response) : base(message)
|
||||
public HttpResponseException(string message, HttpResponseMessage response) : base(message, inner: null, response.StatusCode)
|
||||
{
|
||||
Response = response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user