From abd642e084502f9fae5fefd2f9c05c33a793d0d9 Mon Sep 17 00:00:00 2001 From: mmalden Date: Tue, 17 Feb 2026 17:07:41 -0500 Subject: [PATCH 01/10] adding-error-codes --- .../docs/queues/reference/error-codes.mdx | 77 +++++++++++++++++++ .../queues/reference/wrangler-commands.mdx | 2 +- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 src/content/docs/queues/reference/error-codes.mdx diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx new file mode 100644 index 000000000000000..75ee601be57c52b --- /dev/null +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -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'); +} catch (error) { + console.error(error); + return new Response('Failed to send messag to the queue`, { status: 500}); +} +``` + +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: + +``` +{ + "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 | +| ---------- | ------------------------ | -------------------------------------------------------------------------- | +| 10104 | QueueNotFound | Queue does not exist | +| 10105 | FeatureFlagNotSet | Feature flag not set | +| 10106 | Unauthorized | Unauthorized request (API Gateway) | +| 10107 | QueueIDMalformed | Malformed queue ID in the URL for API Gateway requests | +| 10201 | ClientDisconnected | Client disconnected during request processing | +| 10202 | BatchDelayInvalid | Invalid batch delay | +| 10203 | MessageMetadataInvalid | Invalid message metadata (includes invalid content type and invalid delay) | +| 10204 | MessageSizeOutOfBounds | Message size out of bounds | +| 10205 | BatchSizeOutOfBounds | Batch size out of bounds | +| 10206 | BatchCountOutOfBounds | Batch count out of bounds | +| 10207 | JSONRequestBodyInvalid | API Gateway request JSON body does not match expected schema | +| 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | + +### 429 type errors + +| Error Code | HTTP Status | Details | +| ---------- | ------------------------- | ---------------------------- | +| 10250 | QueueOverloaded | Queue is overloaded | +| 10251 | QueueStorageLimitExceeded | Queue storage limit exceeded | +| 10252 | QueueDisabled | Queue disabled | +| 10253 | FreeTierLimitExceeded | Free tier limit exceeded | + +### 500 type errors + +| Error Code | HTTP Status | Details | +| ---------- | -------------------- | ------------- | +| 15000 | UnknownInternalError | Unknown error | diff --git a/src/content/docs/queues/reference/wrangler-commands.mdx b/src/content/docs/queues/reference/wrangler-commands.mdx index 45be2d8ba6efde7..803cbccae8b1723 100644 --- a/src/content/docs/queues/reference/wrangler-commands.mdx +++ b/src/content/docs/queues/reference/wrangler-commands.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Wrangler commands sidebar: - order: 30 + order: 3 --- From 0f0ebfaa0ec76c3eaddf6470e78383a7897885ee Mon Sep 17 00:00:00 2001 From: mmalden Date: Tue, 17 Feb 2026 17:21:41 -0500 Subject: [PATCH 02/10] adding-recommendation-actions --- .../docs/queues/reference/error-codes.mdx | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx index 75ee601be57c52b..1c0fca10f59bcbb 100644 --- a/src/content/docs/queues/reference/error-codes.mdx +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -46,29 +46,29 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), ### Client side errors -| Error Code | HTTP Status | Details | -| ---------- | ------------------------ | -------------------------------------------------------------------------- | -| 10104 | QueueNotFound | Queue does not exist | -| 10105 | FeatureFlagNotSet | Feature flag not set | -| 10106 | Unauthorized | Unauthorized request (API Gateway) | -| 10107 | QueueIDMalformed | Malformed queue ID in the URL for API Gateway requests | -| 10201 | ClientDisconnected | Client disconnected during request processing | -| 10202 | BatchDelayInvalid | Invalid batch delay | -| 10203 | MessageMetadataInvalid | Invalid message metadata (includes invalid content type and invalid delay) | -| 10204 | MessageSizeOutOfBounds | Message size out of bounds | -| 10205 | BatchSizeOutOfBounds | Batch size out of bounds | -| 10206 | BatchCountOutOfBounds | Batch count out of bounds | -| 10207 | JSONRequestBodyInvalid | API Gateway request JSON body does not match expected schema | -| 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | +| 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 | +| 10106 | Unauthorized | Unauthorized request (API Gateway) | ?? | +| 10107 | QueueIDMalformed | Malformed queue ID in the URL for API Gateway requests | ?? | +| 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 | +| 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | Ensure that request body is valid JSON | ### 429 type errors -| Error Code | HTTP Status | Details | -| ---------- | ------------------------- | ---------------------------- | -| 10250 | QueueOverloaded | Queue is overloaded | -| 10251 | QueueStorageLimitExceeded | Queue storage limit exceeded | -| 10252 | QueueDisabled | Queue disabled | -| 10253 | FreeTierLimitExceeded | Free tier limit exceeded | +| 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 From 6029834cd079bb4235fbc661bc15728b10faff67 Mon Sep 17 00:00:00 2001 From: mmalden Date: Wed, 18 Feb 2026 10:05:25 -0500 Subject: [PATCH 03/10] updating-actions --- .../docs/queues/reference/error-codes.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx index 1c0fca10f59bcbb..d8593c6840c535f 100644 --- a/src/content/docs/queues/reference/error-codes.mdx +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -46,28 +46,28 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), ### 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 | -| 10106 | Unauthorized | Unauthorized request (API Gateway) | ?? | -| 10107 | QueueIDMalformed | Malformed queue ID in the URL for API Gateway requests | ?? | -| 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 | -| 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | Ensure that request body is valid JSON | +| 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 | +| 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 | +| 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | REST API request body is not valid. Look at error message for additional details. | ### 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) | | +| 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 From b5563bb8fc03d17481b56d83e1aef6d29136a3d3 Mon Sep 17 00:00:00 2001 From: mmalden Date: Wed, 18 Feb 2026 13:24:39 -0500 Subject: [PATCH 04/10] updated-links-and-actions --- .../docs/queues/reference/error-codes.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx index d8593c6840c535f..617f579dd1adfe3 100644 --- a/src/content/docs/queues/reference/error-codes.mdx +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -5,7 +5,7 @@ sidebar: order: 4 --- -This page documents error codes returned by Queues when using the [Workers API](/r2/api/workers/). +This page documents error codes returned by Queues when using the [Queues Cloudflare API](/api/resources/queues/methods/create/). ## How errors are returned @@ -46,20 +46,20 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), ### 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 | -| 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 | -| 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | REST API request body is not valid. Look at error message for additional details. | +| 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 | +| 10106 | Unauthorized | Unauthorized request | Ensure that current user has permission to push to that queue. | +| 10107 | QueueIDMalformed | The queue ID in the request URL is not a valid queue identifier | Ensure that 'queue_id` contains only alphanumeric characters. | | +| 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) | Ensure `contentType` is one of `text`, `bytes`, `json`, or `v8`. Ensure the message delay does not exceed the [maximum delivery delay](/queues/configuration/javascript-apis/#extracting-body-content-type-and-timestamp) | +| 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 | +| 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | REST API request body is not valid. Look at error message for additional details. | ### 429 type errors From 378e6a84dafb670436b17e2f84436c41cf9ce66e Mon Sep 17 00:00:00 2001 From: mmalden Date: Wed, 18 Feb 2026 13:28:09 -0500 Subject: [PATCH 05/10] adding-rec-actions --- src/content/docs/queues/reference/error-codes.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx index 617f579dd1adfe3..b660b0f057062d5 100644 --- a/src/content/docs/queues/reference/error-codes.mdx +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -52,7 +52,7 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), | 10105 | FeatureFlagNotSet | Feature flag not set | Ensure that feature flag is set past `February 17, 2026` compatibility date | | 10106 | Unauthorized | Unauthorized request | Ensure that current user has permission to push to that queue. | | 10107 | QueueIDMalformed | The queue ID in the request URL is not a valid queue identifier | Ensure that 'queue_id` contains only alphanumeric characters. | | -| 10201 | ClientDisconnected | Client disconnected during request processing | ?? | +| 10201 | ClientDisconnected | Client disconnected during request processing | Consider increasing timeout and retry message send. | | 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) | Ensure `contentType` is one of `text`, `bytes`, `json`, or `v8`. Ensure the message delay does not exceed the [maximum delivery delay](/queues/configuration/javascript-apis/#extracting-body-content-type-and-timestamp) | | 10204 | MessageSizeOutOfBounds | Message size out of bounds | Ensure that message size is within 0 and 128 KB | @@ -65,7 +65,7 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), | Error Code | HTTP Status | Details | Recommended actions | | ---------- | ------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------- | -| 10250 | QueueOverloaded | Queue is overloaded | ?? | +| 10250 | QueueOverloaded | Queue is overloaded | Temporarily back off sending messages to the queue. | | 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 | From a1749269981eb9b003c0c43c130eea5c8a7964ee Mon Sep 17 00:00:00 2001 From: mia303 Date: Wed, 18 Feb 2026 14:23:34 -0500 Subject: [PATCH 06/10] Update error-codes.mdx --- src/content/docs/queues/reference/error-codes.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx index b660b0f057062d5..20f2bac4810aab0 100644 --- a/src/content/docs/queues/reference/error-codes.mdx +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -46,7 +46,7 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), ### Client side errors -| Error Code | HTTP Status | Details | Recommended actions | +| Error Code | Error | 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 | @@ -63,7 +63,7 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), ### 429 type errors -| Error Code | HTTP Status | Details | Recommended actions | +| Error Code | Error | Details | Recommended actions | | ---------- | ------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------- | | 10250 | QueueOverloaded | Queue is overloaded | Temporarily back off sending messages to the queue. | | 10251 | QueueStorageLimitExceeded | Queue storage limit exceeded | [Purge queue](/queues/configuration/pause-purge/#purge-queue) or wait for queue to process backlog | From 3b24334c4a9ef1d9ce48c66b7705e0e8a95459a1 Mon Sep 17 00:00:00 2001 From: mmalden Date: Wed, 18 Feb 2026 14:30:31 -0500 Subject: [PATCH 07/10] remove-flag-error --- src/content/docs/queues/reference/error-codes.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx index 20f2bac4810aab0..3cf405504ece93c 100644 --- a/src/content/docs/queues/reference/error-codes.mdx +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -47,19 +47,18 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), ### Client side errors | Error Code | Error | 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 | | 10106 | Unauthorized | Unauthorized request | Ensure that current user has permission to push to that queue. | -| 10107 | QueueIDMalformed | The queue ID in the request URL is not a valid queue identifier | Ensure that 'queue_id` contains only alphanumeric characters. | | +| 10107 | QueueIDMalformed | The queue ID in the request URL is not a valid queue identifier | Ensure that 'queue_id` contains only alphanumeric characters. | | 10201 | ClientDisconnected | Client disconnected during request processing | Consider increasing timeout and retry message send. | | 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) | Ensure `contentType` is one of `text`, `bytes`, `json`, or `v8`. Ensure the message delay does not exceed the [maximum delivery delay](/queues/configuration/javascript-apis/#extracting-body-content-type-and-timestamp) | | 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 | -| 10208 | JSONRequestBodyMalformed | API Gateway request body is not valid JSON | REST API request body is not valid. Look at error message for additional details. | +| 10207 | JSONRequestBodyInvalid | Request JSON body does not match expected schema | Ensure that JSON body matches the expected schema | +| 10208 | JSONRequestBodyMalformed | Request body is not valid JSON | REST API request body is not valid. Look at error message for additional details. | ### 429 type errors From 30d8ad349917f4b2772c410d7f0056e077b6392c Mon Sep 17 00:00:00 2001 From: mia303 Date: Fri, 20 Feb 2026 09:53:03 -0500 Subject: [PATCH 08/10] Update error-codes.mdx --- src/content/docs/queues/reference/error-codes.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx index 3cf405504ece93c..af1fe1e7701e48b 100644 --- a/src/content/docs/queues/reference/error-codes.mdx +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -50,7 +50,7 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), | ---------- | ------------------------ | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 10104 | QueueNotFound | Queue does not exist | Check for existence of `queue_id` in [List Queues endpoint](/api/resources/queues/) | | 10106 | Unauthorized | Unauthorized request | Ensure that current user has permission to push to that queue. | -| 10107 | QueueIDMalformed | The queue ID in the request URL is not a valid queue identifier | Ensure that 'queue_id` contains only alphanumeric characters. | +| 10107 | QueueIDMalformed | The queue ID in the request URL is not a valid queue identifier | Ensure that `queue_id` contains only alphanumeric characters. | | 10201 | ClientDisconnected | Client disconnected during request processing | Consider increasing timeout and retry message send. | | 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) | Ensure `contentType` is one of `text`, `bytes`, `json`, or `v8`. Ensure the message delay does not exceed the [maximum delivery delay](/queues/configuration/javascript-apis/#extracting-body-content-type-and-timestamp) | @@ -58,7 +58,7 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), | 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 | Request JSON body does not match expected schema | Ensure that JSON body matches the expected schema | -| 10208 | JSONRequestBodyMalformed | Request body is not valid JSON | REST API request body is not valid. Look at error message for additional details. | +| 10208 | JSONRequestBodyMalformed | Request body is not valid JSON | [REST API](/api/resources/queues/methods/create/) request body is not valid. Look at error message for additional details. | ### 429 type errors From 9893c2b0c35560997ead2972d61694461e244f64 Mon Sep 17 00:00:00 2001 From: mia303 Date: Fri, 20 Feb 2026 10:21:47 -0500 Subject: [PATCH 09/10] Update src/content/docs/queues/reference/error-codes.mdx Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com> --- src/content/docs/queues/reference/error-codes.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx index af1fe1e7701e48b..311c1b1756bbc6d 100644 --- a/src/content/docs/queues/reference/error-codes.mdx +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -13,7 +13,7 @@ For the [JavaScript APIs](/queues/configuration/javascript-apis/), Queues operat ```js try { - await env.MY_QUEUE.send("message," { delaySeconds: 999999}); + await env.MY_QUEUE.send("message", { delaySeconds: 999999 }); return new Response('Sent message to the queue'); } catch (error) { console.error(error); From 3d54be2644334e406ec65d08e7fd1c45d315dd1f Mon Sep 17 00:00:00 2001 From: mia303 Date: Fri, 20 Feb 2026 10:22:39 -0500 Subject: [PATCH 10/10] Apply suggestions from code review Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com> --- src/content/docs/queues/reference/error-codes.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/docs/queues/reference/error-codes.mdx b/src/content/docs/queues/reference/error-codes.mdx index 311c1b1756bbc6d..21727e579cf7093 100644 --- a/src/content/docs/queues/reference/error-codes.mdx +++ b/src/content/docs/queues/reference/error-codes.mdx @@ -14,16 +14,16 @@ For the [JavaScript APIs](/queues/configuration/javascript-apis/), Queues operat ```js try { await env.MY_QUEUE.send("message", { delaySeconds: 999999 }); - return new Response('Sent message to the queue'); + return new Response("Sent message to the queue"); } catch (error) { console.error(error); - return new Response('Failed to send messag to the queue`, { status: 500}); + return new Response("Failed to send message to the queue", { status: 500 }); } ``` 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: -``` +```json { "errors": [ { @@ -53,7 +53,7 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), | 10107 | QueueIDMalformed | The queue ID in the request URL is not a valid queue identifier | Ensure that `queue_id` contains only alphanumeric characters. | | 10201 | ClientDisconnected | Client disconnected during request processing | Consider increasing timeout and retry message send. | | 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) | Ensure `contentType` is one of `text`, `bytes`, `json`, or `v8`. Ensure the message delay does not exceed the [maximum delivery delay](/queues/configuration/javascript-apis/#extracting-body-content-type-and-timestamp) | +| 10203 | MessageMetadataInvalid | Invalid message metadata (includes invalid content type and invalid delay) | Ensure `contentType` is one of `text`, `bytes`, `json`, or `v8`. Ensure the message delay does not exceed the [maximum of 24 hours](/queues/platform/limits/) | | 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 | @@ -71,6 +71,6 @@ For the [Cloudflare API via HTTP](/api/resources/queues/subresources/messages/), ### 500 type errors -| Error Code | HTTP Status | Details | +| Error Code | Error | Details | | ---------- | -------------------- | ------------- | | 15000 | UnknownInternalError | Unknown error |