Cloudflare Fundamentals - Structured error responses for Cloudflare 5xx errors
2mo ago
Source
CloudflareCloudflare Fundamentals - Structured error responses for Cloudflare 5xx errorscloudflare.comCloudflare-generated 5xx error responses now return structured JSON and Markdown when agents request them, matching the format already available for 1xxx errors. Responses follow RFC 9457 (Problem Details for HTTP APIs) and include a Retry-After HTTP header on retryable codes. Changes 5xx coverage. Ten Cloudflare-generated error codes (500, 502, 504, 520-526) now serve structured responses. These are errors Cloudflare itself generates when it cannot reach or understand the origin server. Origin-generated 5xx responses that Cloudflare passes through are not affected. Fault attribution. The error_category field tells agents where the fault lies: origin (502, 504, 520-524) — the origin server is responsible. Transient; retry with the backoff in retry_after . cloudflare (500) — Cloudflare's fault, not the website or the request. Short retry. ssl (525, 526) — the origin's TLS configuration is broken. Do not retry. Retry-After header. Retryable codes (500, 502, 504, 520-524) include a Retry-After HTTP header matching the retry_after body field. Non-retryable codes (525, 526) do not include the header. Negotiation behavior Request header sent Response format Accept: application/json JSON ( application/json content type) Accept: application/problem+json JSON ( application/problem+json content type) Accept: application/json, text/markdown;q=0.9 JSON Accept: text/markdown Markdown Accept: text/markdown, application/json Markdown (equal q , first-listed wins) Accept: */* HTML (default) Availability Available now for all zones on all plans. Get started Get JSON response for error 522: curl -s --compressed -H "Accept: application/json" -A "TestAgent/1.0" -H "Accept-Encoding: gzip, deflate" "/cdn-cgi/error/522"
You might also wanna read
Cloudflare Error 521: Web Server Connection Failure
This appears to be a Cloudflare error page notification indicating that a web server is down with error code 521. The content shows status i
shaun.nz·8mo ago

Cloudflare Error 522: Connection to www.johndcook.com Timed Out
This is not a traditional article but rather a Cloudflare error page indicating that the connection to www.johndcook.com timed out (Error 52
Custom Cloudflare-Style Error Page Generator: Open-Source Tool for Website Error Pages
This article describes an open-source GitHub project called 'cloudflare-error-page' that allows users to create customized error pages mimic
Cloudflare Outage Linked to Rust Code Rewrite from C
The article discusses Cloudflare's largest-ever outage, attributing it to a significant factor: code rewritten from C to Rust. The Rust-base
Author Responds to Criticism of Cloudflare Outage Analysis
The article is a response to criticism about a previous analysis of Cloudflare's outage. The author acknowledges that their earlier piece wa

Comments
Sign in to join the conversation.
No comments yet. Be the first.