这是indexloc提供的服务,不要输入任何密码
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 @@ -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",
Expand Down
20 changes: 16 additions & 4 deletions ShopifySharp/Infrastructure/ShopifyHttpException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
namespace ShopifySharp.Infrastructure;

public class ShopifyHttpException(
string requestInfo,
HttpStatusCode statusCode,
ICollection<string> 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;
Expand All @@ -25,5 +24,18 @@ public class ShopifyHttpException(
/// The X-Request-Id header returned by Shopify. This can be used when working with the Shopify support team to identify the failed request.
public new readonly string? RequestId = requestId;

public readonly string RequestInfo = requestInfo;
/// Extra details about the request, for logging purposes.
public readonly string? RequestInfo;

public ShopifyHttpException(
string requestInfo,
HttpStatusCode statusCode,
ICollection<string> errors,
string message,
string rawResponseBody,
string? requestId)
: this(statusCode, errors, message, rawResponseBody, requestId)
{
RequestInfo = requestInfo;
}
}