If the server doesn't return a successful HttpStatusCode in the Successful range (200-299) for the request, then the HttpResponseMessage.IsSuccessStatusCode property is set to false. Calling EnsureSuccessStatusCode causes the value of IsSuccessStatusCode to be checked, and an exception thrown if that value is false. No exception is thrown if the value is true.
Describe the bug
This appears to be a bug in the documentation, but if you follow this guide: https://github.com/ZiggyCreatures/FusionCache/blob/main/docs/ConditionalRefresh.md#-a-practical-example
Calling 'EnsureSuccessStatusCode' will fail if the server really does reply with 304 not modified, because that is not considered a "success code"
https://learn.microsoft.com/en-us/uwp/api/windows.web.http.httpresponsemessage.ensuresuccessstatuscode?view=winrt-26100#remarks