507

HTTP 507 Insufficient Storage

5xx Server Error

5xx Server Error RFC 4918, Section 11.5

What is HTTP 507 Insufficient Storage?

The 507 (Insufficient Storage) status code indicates that the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. This is commonly used in WebDAV but also applies to any server that runs out of disk space.

Common Use Cases

  • Disk space exhaustion
  • Storage quota exceeded
  • WebDAV quota limits

Usage Example

When a user tries to upload a file but the server's disk is full or the user has exceeded their storage quota, return 507 Insufficient Storage. Include details about the quota limit and current usage so the user knows how much space they need to free up.

// Laravel - checking storage limits
$disk = Storage::disk('local');
$maxBytes = 500 * 1024 * 1024; // 500MB quota
$usedBytes = $disk->size('/user-uploads/' . $user->id);

if ($usedBytes + $uploadSize > $maxBytes) {
    return response()->json([
        'error' => 'Storage quota exceeded',
        'quota_mb' => 500,
        'used_mb' => round($usedBytes / 1024 / 1024, 2),
    ], 507);
}

Common Mistakes

⚠️

Mistake: Using 413 instead of 507 for storage quota issues

Fix: Use 413 when the uploaded file exceeds a per-request size limit. Use 507 when the server or user has insufficient total storage capacity, even if the individual file is within size limits.

Last updated: 21 Jun 2026