200 OK
The request succeeded.
Common causes: Normal response.
What to do: Nothing to fix. If the content is empty or unexpected, check the response body and the Content-Type header.
All the common HTTP codes (401, 403, 404, 419, 429, 500, 502…): meaning, causes and what to do. Everything happens in your browser.
The request succeeded.
Common causes: Normal response.
What to do: Nothing to fix. If the content is empty or unexpected, check the response body and the Content-Type header.
Resource created.
Common causes: Normal response to a POST that creates an item.
What to do: The new resource URL is often in the Location header.
Success, no content.
Common causes: Common after a DELETE or an OPTIONS request (CORS preflight).
What to do: Do not call response.json() on a 204: there is nothing to read.
The resource moved permanently.
Common causes: Domain change, switch to HTTPS, trailing / added or removed.
What to do: Update your links. Beware: a POST redirected with 301 may turn into a GET; use 308 to keep the method.
Temporary redirect.
Common causes: Login page, redirect after a form.
What to do: If an API answers 302 to /login, your session or token is not being sent.
The browser cache is up to date.
Common causes: Conditional request (If-None-Match, If-Modified-Since).
What to do: Normal. If you do not see your changes, clear the cache or version your files (app.js?v=2).
Temporary redirect that keeps the method.
Common causes: Browser-internal HSTS, maintenance, load balancing.
What to do: Follow the Location header with the same method and body.
Permanent redirect that keeps the method.
Common causes: An API endpoint moved.
What to do: Update the URL you call.
The server cannot understand the request.
Common causes: Malformed JSON, missing or wrongly typed parameter, missing Content-Type header, cookie too large.
What to do: Read the response body (it often names the faulty field) and validate your JSON.
Authentication missing or invalid.
Common causes: API key missing, wrong or revoked, expired token, badly written Authorization header (Bearer <token>).
What to do: Check the key or token (expiry with a JWT decoder) and how it is sent.
Step-by-step fix: Fix error 401 "Incorrect API key provided" / "invalid x-api-key"
You are identified but not allowed.
Common causes: Insufficient rights, firewall or WAF, blocked IP, file permissions on the server, CSRF token rejected.
What to do: Check the account roles, the firewall rules and, on the server, folder permissions (chmod 755 for folders, 644 for files).
The resource does not exist at this address.
Common causes: Typo in the URL, undeclared route, stale route cache, missing URL rewriting, wrong method served by another route.
What to do: Compare the exact URL called with the route list (php artisan route:list, flask routes…), then clear the route cache.
The HTTP method is not accepted here.
Common causes: Calling a POST route with GET, form without @method('PUT'), redirect turning a POST into a GET.
What to do: Use the method the route expects; the Allow header lists the possible methods.
The client took too long to send the request.
Common causes: Slow connection, large upload, proxy.
What to do: Retry, reduce the upload size or raise the server timeout.
The request conflicts with the current state.
Common causes: Duplicate (email already taken), concurrent edit, outdated version.
What to do: Reload the resource, then retry with fresh data.
Step-by-step fix: Fix "ERROR 1062 (23000): Duplicate entry for key" (MySQL, MariaDB, PostgreSQL)
The resource was permanently removed.
Common causes: Content removed, old API version shut down.
What to do: Remove links to this address or move to the new version.
The request body is too large.
Common causes: File over client_max_body_size (Nginx), upload_max_filesize / post_max_size (PHP) or the API limit.
What to do: Raise the web server and language limits, or compress / split the upload.
Body format not accepted.
Common causes: Missing or wrong Content-Type header (text/plain instead of application/json).
What to do: Send Content-Type: application/json with a JSON body (or multipart/form-data for a file).
Laravel-specific code: CSRF token missing or expired.
Common causes: Form without @csrf, expired session, blocked cookies, wrong session domain.
What to do: Add @csrf or the X-CSRF-TOKEN header, then check the session configuration.
Step-by-step fix: Fix "419 Page Expired" in Laravel (CSRF token mismatch)
Request understood but the data is invalid.
Common causes: Validation failed (required field, email format, length).
What to do: Read the returned error list (often errors in the JSON) and fix the fields.
Too many requests in a short time.
Common causes: API rate limit (AI, social networks), loop calling without pause, quota exhausted.
What to do: Honour the Retry-After header, add exponential backoff and caching.
Step-by-step fix: Fix error 429 "Rate limit reached" on OpenAI, Claude and Gemini APIs
Headers too large.
Common causes: Cookies piled up on localhost, huge token in a header.
What to do: Delete the domain cookies and slim down the headers.
Content blocked for legal reasons.
Common causes: Geo-restriction, court order.
What to do: Nothing to fix in code.
The server crashed while handling the request.
Common causes: Unhandled exception, syntax error, unreachable database, missing .env file, cache folder permissions.
What to do: Read the server logs (storage/logs/laravel.log, the Nginx/Apache error.log, the app output): the real error is there.
Feature not supported by the server.
Common causes: HTTP method unknown to the server.
What to do: Check the method used and the API version.
The proxy got an invalid response from the app.
Common causes: App (PHP-FPM, Node, Gunicorn) stopped or crashed, wrong port or socket in the Nginx config, container not started.
What to do: Check that the app is running and listening on the port or socket the proxy points to, then read its logs.
Service temporarily unavailable.
Common causes: Maintenance mode (php artisan down), overloaded server, saturated third-party service.
What to do: Wait and retry (Retry-After header); leave maintenance mode with php artisan up.
The proxy waited too long for the app.
Common causes: Slow request (database, external call, AI), proxy_read_timeout too short.
What to do: Speed up the work or move it to a background job; raise the proxy timeout if justified.
Cloudflare code: empty or invalid response from the origin.
Common causes: Origin server crashed, headers too large, connection reset.
What to do: Test the origin server directly and read its logs.
Cloudflare code: the origin server does not answer.
Common causes: Server down, firewall blocking Cloudflare IPs, wrong IP in DNS.
What to do: Check that the server is reachable and that Cloudflare IPs are allowed.
No code matches.
Location header.401: the server does not know who you are (credentials missing or invalid). 403: it knows who you are, but you are not allowed to access the resource.
502: the proxy (Nginx, Cloudflare) got an invalid response or none from the app. 504: it waited too long. In both cases, look at the app logs first.
No: the response can be a perfectly normal 200; the browser refuses to hand it to your script because the Access-Control-Allow-Origin header is missing.
The browser blocks the response because the API server did not allow your page’s origin. The fix is on the server: send the Access…
JavaScript & Node.js Intermediate 20 min SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSONYour code calls response.json() or JSON.parse(), but the server returned an HTML page (starting with <!DOCTYPE) instead of JSON. I…
JavaScript & Node.js Beginner 10 min 419 | Page ExpiredLaravel rejected a POST, PUT, PATCH or DELETE request because the CSRF token is missing or does not match the one stored in the se…
PHP & Laravel Beginner 10 min RateLimitError: Error code: 429 - Rate limit reached for requests (rate_limit_exceeded)The provider rejects the request because you are over a rate limit: requests per minute (RPM) or tokens per minute (TPM). Wait for…
AI & LLMs Intermediate 20 min openai.AuthenticationError: Error code: 401 - Incorrect API key provided: sk-proj-****abcdThe API does not recognize the key it received: it is missing, mistyped, revoked or sent in the wrong header. Check that the envir…
AI & LLMs Beginner 10 min Error: could not connect to ollama app, is it running?The client (the ollama command, your script or your app) cannot reach the Ollama server on 127.0.0.1:11434. Start the server (Olla…
AI & LLMs Beginner 10 min OSError: You are trying to access a gated repo. Make sure to have access to it at https://…The model is gated: you must accept its license on its Hugging Face page, then authenticate with a token. Request access on the mo…
AI & LLMs Beginner 10 min 2026/11/27 09:14:02 [error] 31#31: *7 connect() failed (111: Connection refused) while con…Nginx returns 502 Bad Gateway because nothing listens at its upstream address: PHP-FPM, Node or Gunicorn is stopped, listens on an…
Docker & DevOps Intermediate 15 minPaste an error message or a log: the tool recognises the error and opens the right fix.
Validate, format and minify JSON, with the exact line and column of the error.
Test a regular expression live: highlighted matches, groups, replacement.
Decode a JWT: header, payload, readable expiry dates and whether the token has expired.
Compare two versions line by line: additions, deletions, invisible whitespace.
Ce site fonctionne avec quelques cookies indispensables. Avec votre accord, il mesure aussi son audience avec Google Analytics.