Add Craft Cloud diagnostics guidance - #782
Conversation
✅ Deploy Preview for craft-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
62d8048 to
9a8e0cb
Compare
703104d to
9f94152
Compare
9f94152 to
3aab863
Compare
962906a to
1ed53b2
Compare
7528ccf to
e2593ce
Compare
32ab799 to
352f45a
Compare
352f45a to
73720dc
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73720dcb4d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| | `400/403/413` | `x-gateway-flow: /origin/reject` | Detected invalid or malicious request. | | ||
| | `401` | `x-gateway-http-signature: unverified` | The signature was invalid or expired. | | ||
| | `404` | `x-gateway-flow: /` | Hostname did not match a Craft Cloud environment. | | ||
| | `429/503` | `Retry-After: 𝑛` | Automate retry, honoring `Retry-After`. | |
There was a problem hiding this comment.
Limit automatic retries to safe requests
For non-idempotent requests such as GraphQL mutations or form submissions, automatically retrying every 429 or 503 carrying Retry-After can repeat side effects if the first attempt was partially processed. This also conflicts with docs/cloud/headless-apps.md:23-26, which requires bounded retries and permits retrying POST only for read-only queries; qualify this guidance accordingly rather than recommending unconditional automation.
Useful? React with 👍 / 👎.
| | `401` | `x-gateway-http-signature: unverified` | The signature was invalid or expired. | | ||
| | `404` | `x-gateway-flow: /` | Hostname did not match a Craft Cloud environment. | | ||
| | `429/503` | `Retry-After: 𝑛` | Automate retry, honoring `Retry-After`. | | ||
| | `500/502` | No `x-gateway-flow: /origin/fetch` | A gateway error occurred; contact support if it persists. | |
There was a problem hiding this comment.
Distinguish absent flow headers from non-origin flows
When a 500 or 502 response has no x-gateway-flow header at all, it matches both this row and the final 5xx row: this row classifies it as a gateway error, while line 41 says it occurred before the gateway. That is precisely a common diagnostic scenario, so require a present non-/origin/fetch flow value here or otherwise make the two conditions mutually exclusive.
Useful? React with 👍 / 👎.
|
|
||
| - `cf-*`: Cloudflare | ||
| - `x-gateway-*`: Craft Cloud gateway | ||
| - All others: origin (Craft) |
There was a problem hiding this comment.
Avoid attributing every unprefixed header to Craft
This exhaustive attribution is incorrect for intermediary-generated standard headers. In particular, Craft Cloud's gateway and capacity-limiting paths can emit the unprefixed Retry-After used later on this page, and Cloudflare or the gateway may also add or rewrite fields such as Date, Server, and Content-Length; readers could therefore misidentify the response layer. Restrict this statement to known origin headers instead of treating every non-cf-*/x-gateway-* header as origin data.
Useful? React with 👍 / 👎.
Made this a dedicated page, but its placement should probably be rethought or combined with https://craftcms.com/docs/cloud/troubleshooting.html