507

Insufficient Storage

5xx Server Error

ELI5

I don't have enough storage space left to save what you're trying to upload. My disk is full!

Server perspective

Use 507 when the server cannot store the representation needed to complete the request because storage-related resources are exhausted.

When to use

  • Return 507 when the operation would create, copy, or persist data but the server currently lacks the storage capacity to finish it
  • Use it for temporary storage exhaustion rather than for requests that are inherently too large
  • WebDAV operations when the server cannot store the representation needed to complete the request
  • File or document uploads when the server has exhausted available disk, memory, or equivalent storage capacity
  • Create or copy operations that would succeed if server storage were available

How to respond

  • Log which storage resource is exhausted and whether the failure is expected to be temporary
  • If recovery timing is known, consider including retry guidance or Retry-After-like metadata in the response body or headers

Headers to consider

  • No status-specific header is required; Retry-After can be useful when the storage shortage is expected to clear soon

Response body

  • A body is recommended; describe the storage limitation in safe terms and include machine-readable retry or support metadata when available

Server-side pitfalls

  • Do not use 507 when the request body itself is too large regardless of server capacity; that is 413 Content Too Large
  • Do not use 507 for user-plan or authorization rules that are not really storage exhaustion
  • Request payload too large (use 413 Content Too Large)
  • General server errors (use 500 Internal Server Error)
  • Application-level user quota or plan restrictions better represented as a business rule (use 403 Forbidden, 409 Conflict, or 422 Unprocessable Content as appropriate)
  • Temporary service issues unrelated to storage exhaustion (use 503 Service Unavailable)

Examples

WebDAV file upload with insufficient disk space

Request:PUT https://api.example.test/files/video.mp4 # Body <binary video payload>
Response:507 Insufficient Storage # Headers Content-Type: application/json # Body { "error": "insufficient_storage" }

Server's disk is full and cannot store the uploaded video file

Document management system at capacity

Request:POST https://api.example.test/documents # Body <binary document payload>
Response:507 Insufficient Storage # Headers Content-Type: application/json # Body { "error": "insufficient_storage" }

Document storage system has reached capacity limits

References

Related Status Codes