Skip to content

Adding queues error codes#28402

Draft
mia303 wants to merge 7 commits intoproductionfrom
adding-queues-error-codes
Draft

Adding queues error codes#28402
mia303 wants to merge 7 commits intoproductionfrom
adding-queues-error-codes

Conversation

@mia303
Copy link
Contributor

@mia303 mia303 commented Feb 17, 2026

Summary

Adding error codes which are now surfaced off Queues API

Documentation checklist

@github-actions github-actions bot added product:queues Cloudflare Queues: https://developers.cloudflare.com/queues size/s labels Feb 17, 2026
@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/queues/ @elithrar, @jonesphillip, @harshil1712, @mia303, @cloudflare/pcx-technical-writing

| Error Code | HTTP Status | Details | Recommended actions |
| ---------- | ------------------------ | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| 10104 | QueueNotFound | Queue does not exist | Check for existence of `queue_id` in [List Queues endpoint](/api/resources/queues/) |
| 10105 | FeatureFlagNotSet | Feature flag not set | Ensure that feature flag is set past `February 17, 2026` compatibility date |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really call the feature flag middleware ATM so we wont be hitting this error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on @tgarg-cf's feedback that this error is not currently reachable, I suggest removing this row or marking it as reserved/internal. Here's a suggestion to remove it:

Suggested change
| 10105 | FeatureFlagNotSet | Feature flag not set | Ensure that feature flag is set past `February 17, 2026` compatibility date |
| 10104 | QueueNotFound | Queue does not exist | Check for existence of `queue_id` in [List Queues endpoint](/api/resources/queues/) |

Alternatively, if you want to keep it documented for future use, consider adding a note that this error code is reserved and not currently returned.

@elithrar
Copy link
Collaborator

/bonk review this, and where the user tgarg has comments, provide suggestions using the gh CLI suggestion syntax.

Copy link
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I have posted suggestion replies to all of @tgarg-cf's comments above. Beyond those, here are additional issues I found in this PR:

Issues in the code example (lines 14-22)

  1. Line 16: Syntax error in the example code — "message," should be "message", (the comma is inside the string instead of outside it).
  2. Line 20: Mixed quotes — the string starts with a single quote ' but ends with a backtick. Also, "messag" is a typo and should be "message".
  3. Line 17: Inconsistent indentation — uses spaces while the rest of the block uses tabs.

Incorrect link in the intro (line 8)

The intro says "error codes returned by Queues when using the Workers API" but links to /r2/api/workers/ (the R2 Workers API). This should either link to the Queues JavaScript API page (/queues/configuration/javascript-apis/) or be reworded since the page covers both the JS binding API and the HTTP API.

Missing description in frontmatter

The frontmatter is missing a description field, which is recommended for SEO.

Code block on line 26 missing language

The second code block (the JSON response example) uses bare triple backticks with no language. Per the style guide, always specify a language — this should be json.

Table formatting issues (line 67)

The 429 errors table has an extra trailing | --- | column in the header separator and extra | | cells on the QueueDisabled row (line 70). This creates a phantom empty column.

Remaining ?? placeholders

Lines 55 (ClientDisconnected) and 68 (QueueOverloaded) still have ?? as recommended actions. These should be filled in before merging.

"HTTP Status" column is actually the error name

The column header says "HTTP Status" but the values are internal error names like QueueNotFound, Unauthorized, etc. Consider renaming to "Error Name" or "Error Type" and adding an actual HTTP status code column (e.g., 400, 404, 429, 500).

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Feb 18, 2026

Done. Here's a summary of everything posted to PR #28402:

Suggestions posted in reply to @tgarg-cf's comments

  1. Line 52 (FeatureFlagNotSet) — Suggested removing the row since tgarg-cf says this error is not currently reachable. Offered the alternative of marking it as reserved.

  2. Line 53 (Unauthorized) — Replaced ?? with: "Verify that your API token or Worker binding has the correct permissions to publish to the target queue". Updated the Details column to clarify it means insufficient permissions.

  3. Line 54 (QueueIDMalformed) — Replaced ?? with: "Verify that the queue_id in the URL matches an existing queue. Use the List Queues endpoint to find valid queue IDs".

  4. Line 57 (MessageMetadataInvalid) — Rewrote the row to incorporate both pieces of tgarg-cf's feedback: noted it's a binding-only error, specified the valid content types (text, bytes, json, v8), and mentioned the max delivery delay constraint.

  5. Line 57 (binding-only follow-up) — Acknowledged and asked whether error 10202 (BatchDelayInvalid) is also binding-only.

Additional issues flagged in the review summary

  • Code example bugs: syntax error ("message," vs "message",), mixed quote/backtick, typo ("messag"), inconsistent indentation
  • Wrong link: intro links to R2 Workers API instead of Queues API
  • Missing frontmatter description
  • Code block missing language specifier (should be json)
  • Table formatting: extra phantom column in the 429 errors table
  • Remaining ?? placeholders on ClientDisconnected and QueueOverloaded
  • Misleading column header: "HTTP Status" contains error names, not HTTP status codes

github run

| 10204 | MessageSizeOutOfBounds | Message size out of bounds | Ensure that message size is within 0 and 128 KB |
| 10205 | BatchSizeOutOfBounds | Batch size out of bounds | Ensure that batch size is within 0 and 256 KB |
| 10206 | BatchCountOutOfBounds | Batch count out of bounds | Ensure that batch count is within 0 and 100 messages |
| 10207 | JSONRequestBodyInvalid | API Gateway request JSON body does not match expected schema | Ensure that JSON body matches the expected schema |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not include API gatewway here

| 10205 | BatchSizeOutOfBounds | Batch size out of bounds | Ensure that batch size is within 0 and 256 KB |
| 10206 | BatchCountOutOfBounds | Batch count out of bounds | Ensure that batch count is within 0 and 100 messages |
| 10207 | JSONRequestBodyInvalid | API Gateway request JSON body does not match expected schema | Ensure that JSON body matches the expected schema |
| 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | REST API request body is not valid. Look at error message for additional details. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not include API gatewway here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:queues Cloudflare Queues: https://developers.cloudflare.com/queues size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments