Skip to content
Open
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
3 changes: 2 additions & 1 deletion DevProxy.Plugins/Behavior/GenericRandomErrorPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ private ThrottlingInfo ShouldThrottle(Request request, string throttlingKey)
return false;
}

if (errorResponse.Request.Method != request.Method)
if (errorResponse.Request.Method is not null &&
errorResponse.Request.Method != request.Method)
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion DevProxy.Plugins/Models/GenericErrorResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class GenericErrorResponse
public class GenericErrorResponseRequest
{
public string? BodyFragment { get; set; }
public string Method { get; set; } = "GET";
public string? Method { get; set; }
public string Url { get; set; } = string.Empty;
}

Expand Down
Loading