diff --git a/ShopifySharp.Tests/Infrastructure/ResponseClassifierTests.cs b/ShopifySharp.Tests/Infrastructure/ResponseClassifierTests.cs index 3ea18d88..857622fd 100644 --- a/ShopifySharp.Tests/Infrastructure/ResponseClassifierTests.cs +++ b/ShopifySharp.Tests/Infrastructure/ResponseClassifierTests.cs @@ -142,7 +142,7 @@ private ShopifyRateLimitException CreateRateLimitException(ShopifyRateLimitReaso private ShopifyHttpException CreateHttpException(int statusCode) { - return new ShopifyHttpException(string.Empty, (HttpStatusCode)statusCode, + return new ShopifyHttpException((HttpStatusCode)statusCode, [], "some-exception-message", "some-raw-response-body", diff --git a/ShopifySharp/Infrastructure/ShopifyHttpException.cs b/ShopifySharp/Infrastructure/ShopifyHttpException.cs index b6b99f2f..69ef0c17 100644 --- a/ShopifySharp/Infrastructure/ShopifyHttpException.cs +++ b/ShopifySharp/Infrastructure/ShopifyHttpException.cs @@ -9,8 +9,8 @@ public class ShopifyHttpException( ICollection errors, string message, string rawResponseBody, - string? requestId -) : ShopifyException(statusCode, errors, message, rawResponseBody, requestId) + string? requestId) + : ShopifyException(statusCode, errors, message, rawResponseBody, requestId) { /// The Http response status code. public new readonly HttpStatusCode HttpStatusCode = statusCode; @@ -25,5 +25,17 @@ public class ShopifyHttpException( public new readonly string? RequestId = requestId; /// Extra details about the request, for logging purposes. - public readonly string? RequestInfo = requestInfo; + public readonly string? RequestInfo; + + public ShopifyHttpException( + string requestInfo, + HttpStatusCode statusCode, + ICollection errors, + string message, + string rawResponseBody, + string? requestId) + : this(statusCode, errors, message, rawResponseBody, requestId) + { + RequestInfo = requestInfo; + } }