Option to pass application 5xx responses through the App Platform ingress unchanged
I
Isaac
When a container on App Platform returns any 5xx response, the ingress replaces
it with a generic HTML error page and a 504 status. The original status survives
only as a response header: for a 503 my API sent, clients receive
HTTP/2 504
content-type: text/html
x-do-orig-status: 503
with the body dropped. Support confirmed this is enforced by the
Cloudflare integration and cannot be changed per app.
Why this matters:
- Structured API errors. My API returns 503 with a JSON body (an error code and
a user-facing message) when a downstream dependency such as the database is
unavailable. The API itself is healthy. Mobile clients render that message;
with the substitution they receive HTML they cannot parse and fall back to a
generic error, so the app cannot tell users what actually happened or whether
it is safe to retry.
- Health and status endpoints. A /health endpoint that answers 503 with a JSON
report of which internal check failed is standard practice. Monitors still
see "down", but the report never leaves the platform, so operators cannot
read it from outside.
- Standard error contracts. RFC 9457 problem details, GraphQL over HTTP and
most SDKs assume the origin's status and body are delivered as sent.
Requested: a per-app (or per-component) setting to pass origin 5xx responses
through unchanged, or at minimum to preserve the origin status code and
content-type. The platform page could remain the default and still apply when
the origin is unreachable, which is the case it exists for.