507 Insufficient Storage

HTTP response status code 507 Insufficient Storage is a server error message that indicates the server does not have sufficient space to accommodate the HTTP request.

Usage

When the 507 Insufficient Storage status code is received, the server does not have enough storage space to accommodate the HTTP request. This can be a PUT or POST HTTP request that normally be valid, not exceeding the client’s quota if applicable, but instead cannot succeed because the server’s storage is full. The message was designed as part of the WebDAV specification, and it is considered to be a temporary problem.

This client HTTP request must not be repeated until it is subsequently requested by a different action.

A related client error is the 413 Payload Too Large status code, which indicates that the data included with the HTTP request is larger than what the server is willing to accept. For example, if the HTTP client has exceeded their quota then this will be a reasonable client-side error.

Example

In the example, the HTTP client attempts to transfer a file and the server responds with a 507 Insufficient Storage status code because it is out of storage space.

Request

PUT /docs HTTP/1.1
Host: www.example.re
Content-Type: applications/pdf
Content-Length: 10000

<PDF file included in message body>

Response

HTTP/1.1 507 Insufficient Storage
Content-Type: text/html
Content-Length: 197

<html>
  <head>
    <title>Insufficient Storage</title>
  </head>
  <body>
   <p>The server has temporarily run out of space and cannot accommodate your file transfer request.</p>
  </body>
</html>

Code references

.NET

HttpStatusCode.InsufficientStorage

Rust

http::StatusCode::INSUFFICIENT_STORAGE

Rails

:insufficient_storage

Go

http.StatusInsufficientStorage

Symfony

Response::HTTP_INSUFFICIENT_STORAGE

Python3.5+

http.HTTPStatus.INSUFFICIENT_STORAGE

Apache HttpComponents Core

org.apache.hc.core5.http.HttpStatus.SC_INSUFFICIENT_STORAGE

Angular

@angular/common/http/HttpStatusCode.InsufficientStorage

Takeaway

The 507 Insufficient Storage status code is a server error indicating that the HTTP request cannot be completed because the server has run out of storage space, and the condition is expected to be temporary.

See also

Last updated: August 2, 2023