507

Insufficient Storage

5xx Server Error

Back to list

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

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

Examples

Upload fails because object store is out of capacity

Request:PUT /dav/files/video.mp4
Response:507 Insufficient Storage with error: storage_exhausted

The server could store the file in principle, but not while the backing storage tier is out of space.

References

Related 5xx Server Error Codes