Other 5xx codes
All HTTP status codes in ASP.NET Core
5xx Server error
The server cannot store what the request needs (WebDAV).
In ASP.NET Core: Occasionally used for quota or disk-full errors.
The StatusCodes constant, HttpStatusCode enum name, reason phrase, class, and how EnsureSuccessStatusCode() and the standard resilience handler treat 507.
| Constant | StatusCodes.Status507InsufficientStorage |
|---|---|
| HttpStatusCode | HttpStatusCode.InsufficientStorage |
| Reason phrase | Kestrel sends Insufficient Storage |
| Class | 5xx, server error |
| IsSuccessStatusCode | false |
| EnsureSuccessStatusCode() | throws HttpRequestException: Response status code does not indicate success: 507 (Insufficient Storage). |
| Standard resilience handler | retries it (treated as transient) |
Results.StatusCode(StatusCodes.Status507InsufficientStorage)
Results.Problem(statusCode: StatusCodes.Status507InsufficientStorage, detail: "...")StatusCode(StatusCodes.Status507InsufficientStorage)
Problem(statusCode: StatusCodes.Status507InsufficientStorage, detail: "...")What Results.Problem(statusCode: 507) sends (with AddProblemDetails()), as application/problem+json:
{
"title": "Insufficient Storage",
"status": 507,
"traceId": "0HNA1B2C3D4E5:00000001"
}A controller's Problem(statusCode: 507) sends a different body, because MVC only fills type and title for codes in ApiBehaviorOptions.ClientErrorMapping:
{
"status": 507,
"traceId": "0HNA1B2C3D4E5:00000001"
}A bare StatusCode(507) in an [ApiController] also gets a ProblemDetails body automatically; Results.StatusCode(507) in a minimal API sends an empty body unless you add UseStatusCodePages().
Every response on this page was recorded from ASP.NET Core 10.0.12 on Kestrel in the Production environment; the HttpClient rows come from .NET 10.0.12 and Microsoft.Extensions.Http.Resilience 10.10.0.
All HTTP status codes in ASP.NET Core