102 Processing
Fault: Neither
TL;DR
Used to prevent the client from timing out while waiting for the server to complete the request.
The server has received and is processing the request, but no response is available yet.
What This Error Means
The server has received and is processing the request, but no response is available yet.
Used to prevent the client from timing out while waiting for the server to complete the request.
Common Causes
- Long-running request
- WebDAV operations
- Server needs more time to process
How to Fix It (For Visitors)
- Wait for the server to complete processing
How to Fix It (For Developers/Admins)
- Use for operations taking longer than 20 seconds
- Implement proper timeout handling
Code Examples
Here's how to return a 102 status code in various programming languages:
Python (Flask)
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/endpoint')
def endpoint():
return jsonify({"message": "Processing"}), 102
Node.js (Express)
const express = require('express');
const app = express();
app.get('/endpoint', (req, res) => {
res.status(102).json({ message: 'Processing' });
});
PHP
<?php
http_response_code(102);
header('Content-Type: application/json');
echo json_encode(['message' => 'Processing']);
?>
Go
package main
import (
"encoding/json"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(102)
json.NewEncoder(w).Encode(map[string]string{
"message": "Processing",
})
}
Java (Spring Boot)
@GetMapping("/endpoint")
public ResponseEntity<Map<String, String>> endpoint() {
Map<String, String> response = new HashMap<>();
response.put("message", "Processing");
return ResponseEntity.status(102).body(response);
}
Ruby (Sinatra)
get '/endpoint' do
status 102
json message: 'Processing'
end
Browser Compatibility
| Browser | Support | Notes |
|---|---|---|
| Chrome | ✓ Full Support | All versions |
| Firefox | ✓ Full Support | All versions |
| Safari | ✓ Full Support | All versions |
| Edge | ✓ Full Support | All versions |
Official Specification
This status code is defined in RFC 2518.