Example HTTP Response
HTTP/1.1 507 Insufficient Storage- Server disk space exhausted
- Database storage limit reached
- WebDAV quota exceeded
What does this mean?
The server's hard drive is stuffed! Like trying to save a file when your disk is full. Time for some spring cleaning!
Technical Definition
The server is unable to store the representation needed to complete the request.
RFC Says
"The 507 (Insufficient Storage) status code means 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 condition is considered to be temporary. If the request that received this status code was the result of a user action, the request MUST NOT be repeated until it is requested by a separate user action."
Plain English:
507 means 'I don't have enough disk space/storage to complete your request.' This comes from WebDAV and is used when the server's storage is full. Unlike 413 (payload too large), which means your request is too big, 507 means the server is out of space.
Common Misinterpretation
This is WebDAV-specific but can be useful for file upload services and cloud storage APIs. Don't use 507 for quota limits (use 403 or 429) - use it specifically when the server's physical storage is full. Consider including details about available space or upgrade options.
Ready-to-use code for returning this HTTP status in your application:
// Express.js
app.get('/example', (req, res) => {
res.status(507).json({
error: 'Insufficient Storage',
message: 'Your error message here'
});
});
// Native HTTP
const http = require('http');
http.createServer((req, res) => {
res.writeHead(507, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({
error: 'Insufficient Storage',
message: 'Your error message here'
}));
}).listen(3000);