Skip to content
Cloudflare Docs

Error codes

This page documents error codes returned by Queues when using the Queues Cloudflare API.

How errors are returned

For the JavaScript APIs, Queues operations throw exceptions that you can catch. The error code is included at the end of the message property:

JavaScript
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 message to the queue", { status: 500 });
}

For the Cloudflare API via HTTP, 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 CodeErrorDetailsRecommended actions
10104QueueNotFoundQueue does not existCheck for existence of queue_id in List Queues endpoint
10106UnauthorizedUnauthorized requestEnsure that current user has permission to push to that queue.
10107QueueIDMalformedThe queue ID in the request URL is not a valid queue identifierEnsure that queue_id contains only alphanumeric characters.
10201ClientDisconnectedClient disconnected during request processingConsider increasing timeout and retry message send.
10202BatchDelayInvalidInvalid batch delayEnsure that batch_delay is within 1 and 86400 seconds
10203MessageMetadataInvalidInvalid 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
10204MessageSizeOutOfBoundsMessage size out of boundsEnsure that message size is within 0 and 128 KB
10205BatchSizeOutOfBoundsBatch size out of boundsEnsure that batch size is within 0 and 256 KB
10206BatchCountOutOfBoundsBatch count out of boundsEnsure that batch count is within 0 and 100 messages
10207JSONRequestBodyInvalidRequest JSON body does not match expected schemaEnsure that JSON body matches the expected schema
10208JSONRequestBodyMalformedRequest body is not valid JSONREST API request body is not valid. Look at error message for additional details.

429 type errors

Error CodeErrorDetailsRecommended actions
10250QueueOverloadedQueue is overloadedTemporarily back off sending messages to the queue.
10251QueueStorageLimitExceededQueue storage limit exceededPurge queue or wait for queue to process backlog
10252QueueDisabledQueue disabledUnpause queue
10253FreeTierLimitExceededFree tier limit exceededUpgrade to Workers Paid

500 type errors

Error CodeErrorDetails
15000UnknownInternalErrorUnknown error