-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Adding queues error codes #28402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+77
−1
Merged
Adding queues error codes #28402
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
abd642e
adding-error-codes
mia303 0f0ebfa
adding-recommendation-actions
mia303 6029834
updating-actions
mia303 b5563bb
updated-links-and-actions
mia303 378e6a8
adding-rec-actions
mia303 a174926
Update error-codes.mdx
mia303 3b24334
remove-flag-error
mia303 30d8ad3
Update error-codes.mdx
mia303 9893c2b
Update src/content/docs/queues/reference/error-codes.mdx
mia303 3d54be2
Apply suggestions from code review
mia303 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| pcx_content_type: reference | ||
| title: Error codes | ||
| sidebar: | ||
| order: 4 | ||
| --- | ||
|
|
||
| This page documents error codes returned by Queues when using the [Workers API](/r2/api/workers/). | ||
|
|
||
| ## How errors are returned | ||
|
|
||
| For the [JavaScript APIs](/queues/configuration/javascript-apis/), Queues operations throw exceptions that you can catch. The error code is included at the end of the `message` property: | ||
|
|
||
| ```js | ||
| try { | ||
| await env.MY_QUEUE.send("message," { delaySeconds: 999999}); | ||
| return new Response('Sent message to the queue'); | ||
mia303 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } catch (error) { | ||
| console.error(error); | ||
| return new Response('Failed to send messag to the queue`, { status: 500}); | ||
mia303 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| ``` | ||
|
|
||
| For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), the response will include an `errors` object which has both a `message` and `code` field: | ||
|
|
||
| ``` | ||
mia303 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| "errors": [ | ||
| { | ||
| "code": 7003, | ||
| "message": "No route for the URI", | ||
| "documentation_url": "documentation_url", | ||
| "source": { | ||
| "pointer": "pointer" | ||
| } | ||
| } | ||
| ], | ||
| "messages": [ | ||
| "string" | ||
| ], | ||
| "success": true | ||
| } | ||
| ``` | ||
|
|
||
| ## Error code reference | ||
|
|
||
| ### Client side errors | ||
|
|
||
| | 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 | | ||
|
Check warning on line 52 in src/content/docs/queues/reference/error-codes.mdx
|
||
| | 10106 | Unauthorized | Unauthorized request | ?? | | ||
| | 10107 | QueueIDMalformed | Malformed queue ID in the request URL | Ensure `queue_id` matches response for that queue from [List Queues endpoint](/api/resources/queues/) | | | ||
| | 10201 | ClientDisconnected | Client disconnected during request processing | ?? | | ||
| | 10202 | BatchDelayInvalid | Invalid batch delay | Ensure that `batch_delay` is within 1 and 86400 seconds | | ||
| | 10203 | MessageMetadataInvalid | Invalid message metadata (includes invalid content type and invalid delay) | ?? | | ||
| | 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 | | ||
mia303 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| | 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | REST API request body is not valid. Look at error message for additional details. | | ||
mia303 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### 429 type errors | ||
|
|
||
| | Error Code | HTTP Status | Details | Recommended actions | | ||
| | ---------- | ------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------- | | ||
| | 10250 | QueueOverloaded | Queue is overloaded | ?? | | ||
| | 10251 | QueueStorageLimitExceeded | Queue storage limit exceeded | [Purge queue](/queues/configuration/pause-purge/#purge-queue) or wait for queue to process backlog | | ||
| | 10252 | QueueDisabled | Queue disabled | [Unpause queue](/queues/configuration/pause-purge/#pause-delivery) | | ||
| | 10253 | FreeTierLimitExceeded | Free tier limit exceeded | Upgrade to Workers Paid | | ||
|
|
||
| ### 500 type errors | ||
|
|
||
| | Error Code | HTTP Status | Details | | ||
mia303 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| | ---------- | -------------------- | ------------- | | ||
| | 15000 | UnknownInternalError | Unknown error | | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| pcx_content_type: navigation | ||
| title: Wrangler commands | ||
| sidebar: | ||
| order: 30 | ||
| order: 3 | ||
|
|
||
| --- | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.