Skip to content

docs(r2): clarify billing for failed 4xx requests in pricing FAQ - #32832

Open
krys-cf wants to merge 1 commit into
cloudflare:productionfrom
krys-cf:docs/DEE-3763-r2-pricing-4xx-billing-faq
Open

docs(r2): clarify billing for failed 4xx requests in pricing FAQ#32832
krys-cf wants to merge 1 commit into
cloudflare:productionfrom
krys-cf:docs/DEE-3763-r2-pricing-4xx-billing-faq

Conversation

@krys-cf

@krys-cf krys-cf commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Expands the R2 pricing FAQ to clarify which failed (4xx) requests are billed as Class A operations. The previous FAQ only mentioned HTTP 401 Unauthorized as exempt, leaving customers uncertain about other error codes like 412 PreconditionFailed, 403 SignatureDoesNotMatch, and 400 BadDigest.

How this was verified

Empirically tested by firing controlled batches of each error type against a dedicated R2 test bucket and querying the r2OperationsAdaptiveGroups GraphQL analytics dataset for operation counts.

Results:

Status Error Code In Analytics? Billed?
200 OK Yes Yes (control)
412 PreconditionFailed Yes Yes
400 BadDigest Yes Yes
403 SignatureDoesNotMatch No No
403 RequestTimeTooSkewed No No
401 Unauthorized No No (documented)

Rule: Authentication-layer failures (401, 403 from signature/expiry checks) are not billed. Authenticated requests that fail post-auth (412, 400) are billed as Class A operations.

Related

DEE-3763

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 1 warning, 💡 6 suggestions found in commit e845f65.

👉 Fix in your agent 👈
Fix the following review findings in PR #32832 (https://github.com/cloudflare/cloudflare-docs/pull/32832).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
  or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.

---

## Style Guide Review

### Warnings (1)

#### SG-1e8d52c66854 · Headings must not end with punctuation
- **File:** `src/content/docs/r2/pricing.mdx` line 167
- **Issue:** ### Will I be charged for failed requests to my R2 bucket?
- **Fix:** Remove the trailing question mark: `### Will I be charged for failed requests to my R2 bucket`

### Suggestions (6)

#### SG-4e578668286a · HTTP status codes should be monospace
- **File:** `src/content/docs/r2/pricing.mdx` line 171
- **Issue:** `HTTP 401` appears without backtick formatting
- **Fix:** Format the status code as `HTTP 401` (`HTTP 401`)

#### SG-bfa3147d1341 · HTTP status codes should be monospace
- **File:** `src/content/docs/r2/pricing.mdx` line 172
- **Issue:** `HTTP 403` appears without backtick formatting
- **Fix:** Format the status code as `HTTP 403`

#### SG-b06565c5359a · HTTP status codes should be monospace
- **File:** `src/content/docs/r2/pricing.mdx` line 176
- **Issue:** `HTTP 412` appears without backtick formatting
- **Fix:** Format the status code as `HTTP 412`

#### SG-ef148faa25fc · HTTP status codes should be monospace
- **File:** `src/content/docs/r2/pricing.mdx` line 177
- **Issue:** `HTTP 400` appears without backtick formatting
- **Fix:** Format the status code as `HTTP 400`

#### SG-7dfea7e49c80 · Bullet lists with fewer than three items should be rewritten as prose
- **File:** `src/content/docs/r2/pricing.mdx` line 171
- **Issue:** The `This includes:` list contains only two items
- **Fix:** Consider rewriting the two-item list as prose

#### SG-379ff02c9060 · Bullet lists with fewer than three items should be rewritten as prose
- **File:** `src/content/docs/r2/pricing.mdx` line 176
- **Issue:** The `For example:` list contains only two items
- **Fix:** Consider rewriting the two-item list as prose

Code Review

This code review is in beta and may not always be helpful — use your judgment.

No code review issues found.

Conventions

No convention issues found.

Style Guide Review

Warnings (1)
File Issue
r2/pricing.mdx line 167 Headings must not end with punctuation — ### Will I be charged for failed requests to my R2 bucket? Fix: Remove the trailing question mark: ### Will I be charged for failed requests to my R2 bucket
Suggestions (6)
File Issue
r2/pricing.mdx line 171 HTTP status codes should be monospaceHTTP 401 appears without backtick formatting Fix: Format the status code as HTTP 401 (HTTP 401)
r2/pricing.mdx line 172 HTTP status codes should be monospaceHTTP 403 appears without backtick formatting Fix: Format the status code as HTTP 403
r2/pricing.mdx line 176 HTTP status codes should be monospaceHTTP 412 appears without backtick formatting Fix: Format the status code as HTTP 412
r2/pricing.mdx line 177 HTTP status codes should be monospaceHTTP 400 appears without backtick formatting Fix: Format the status code as HTTP 400
r2/pricing.mdx line 171 Bullet lists with fewer than three items should be rewritten as prose — The This includes: list contains only two items Fix: Consider rewriting the two-item list as prose
r2/pricing.mdx line 176 Bullet lists with fewer than three items should be rewritten as prose — The For example: list contains only two items Fix: Consider rewriting the two-item list as prose
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@github-actions github-actions Bot added product:r2 R2 object storage: https://developers.cloudflare.com/r2 size/s labels Aug 18, 2026
@krys-cf

krys-cf commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Review findings triage

SG-a60a4d16d913 (trailing question mark): Skipping. This is an FAQ section — the previous heading also used a question mark (### Will I be charged for unauthorized requests to my R2 bucket?), and FAQ headings across the docs site consistently use question marks.

SG-08c62ba463c4 (sentence case): Skipping. The heading is already sentence case: "Will I be charged for failed requests to my R2 bucket?" — only "Will" (start of sentence) and "R2" (product name) are capitalized.

SG-9f3667988d6e (2-item bullet list, auth failures): Skipping. The two items have different HTTP status codes (401 vs 403) and the 403 entry includes sub-codes. Bullets are clearer for scanning than prose here.

SG-945c4da1d8fc (2-item bullet list, examples): Skipping. Same reasoning — each example pairs a distinct status code with an error name and cause. Bullets aid scanability.

@krys-cf
krys-cf force-pushed the docs/DEE-3763-r2-pricing-4xx-billing-faq branch from 27e9f46 to 732a935 Compare August 18, 2026 16:48
@krys-cf
krys-cf requested a review from a team as a code owner August 18, 2026 16:48
Expand the R2 pricing FAQ to explain which failed requests are billed
as Class A operations. The previous FAQ only mentioned 401 Unauthorized
as exempt, leaving customers uncertain about other 4xx status codes.

Empirically tested against R2 analytics API:
- Auth-layer failures (401, 403 SignatureDoesNotMatch/ExpiredRequest/
  RequestTimeTooSkewed) are NOT billed
- Post-auth failures (412 PreconditionFailed, 400 BadDigest) ARE billed

DEE-3763
@krys-cf
krys-cf force-pushed the docs/DEE-3763-r2-pricing-4xx-billing-faq branch from 732a935 to e845f65 Compare August 18, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:r2 R2 object storage: https://developers.cloudflare.com/r2 size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants