JSON Response Support
Cloudflare has updated error handling for 1xxx errors to support structured JSON responses. Clients can now request JSON-formatted error responses by sending either Accept: application/json or Accept: application/problem+json headers. This standardizes error handling across different HTTP clients and improves programmatic error parsing.
RFC 9457 Compliance
The JSON responses follow RFC 9457 (Problem Details for HTTP APIs), a standard for structured error representation. This means any HTTP client that understands Problem Details format can parse the response without Cloudflare-specific code. The JSON responses include standard RFC 9457 members alongside Cloudflare operational fields:
type— URI to Cloudflare documentation for the specific error codestatus— HTTP status code matching the responsetitle— Short human-readable summarydetail— Explanation specific to this occurrenceinstance— Ray ID for tracing the specific error
Breaking Change and Field Renames
The Markdown frontmatter field http_status has been renamed to status in both JSON and Markdown formats. Additionally, what_happened has been renamed to detail in JSON responses. Agents consuming Markdown frontmatter should update their parsers to use the new field names.
Content Negotiation
Responses honor standard HTTP content negotiation:
Accept: application/jsonreturns JSON withapplication/jsoncontent typeAccept: application/problem+jsonreturns JSON withapplication/problem+jsoncontent typeAccept: text/markdownreturns the Markdown format- Default behavior (no specific header) returns HTML
This feature is available immediately for all Cloudflare-generated 1xxx errors.