HTTP status codes: Quick cheat sheet
✅ 200 OK: request succeeded
🆕 201 Created: new resource saved
📝 204 No Content: success, nothing to return
🔀 301 Moved Permanently: use new URL
↪️ 302 Found: temporary redirect
🧾 304 Not Modified: use cached version
🙅 400 Bad Request: invalid input
🪪 401 Unauthorized: missing/invalid auth
🚫 403 Forbidden: authenticated but not allowed
❓ 404 Not Found: resource doesn’t exist
⏳ 408 Request Timeout: client took too long
🧯 409 Conflict: state/version clash
💥 500 Internal Server Error: server crashed
🛠 502 Bad Gateway: upstream failed
🕸 503 Service Unavailable: overloaded/maintenance
⌛️ 504 Gateway Timeout: upstream too slow
✔️ Tips
• return precise codes; don’t default to 200/500
• include a machine-readable error body (code, message, details)
• never leak stack traces in production
• pair 304 with ETag/If-None-Match for caching
Post #1331
696
- ❤ 2