Streaming API Error Codes

Learn about the errors that Streaming API can return to troubleshoot your streaming client.

Error CodeError MessageError Description
400API version in the URI is mandatory. URI format: ‘/cometd/68.0’The API version information isn’t in the URI. Include the API version at the end of the URI. For example, /cometd/68.0.
400Unsupported API version. Only API versions ‘37.0’ and later are supported. URI format: ‘/cometd/68.0’The supplied API version in the URI is not supported. Only API version 37.0 and later are supported. The URI format is /cometd/xx.x.
400Invalid connection type {connection_type}An invalid transport type was used. Only long-polling is supported, but another connection type was requested, such as WebSocket or callback long-polling.
400The channel you requested to subscribe to doesn’t exist {channel_name}The streaming channel requested to subscribe to doesn’t exist. Ensure that the channel is created before subscribing.
400Channel name not specifiedThe channel name wasn’t specified. Specify a valid channel name to subscribe to.
400Channel subscriptions must start with a leading ’/‘The channel name format is invalid. Channel names must start with a leading slash (/).
400Query fields {query_fields} do not exist on the topic entityThe supplied query fields don’t exist on the Salesforce object specified in the PushTopic.
400Client client_name has established a session, but no cookie_name cookie presentNo cookie was found after the client established a session. Ensure that the streaming client accepts cookies.
400The replayId {replay_id} you provided was invalid. Please provide a valid ID, -2 to replay all events, or -1 to replay only new events.The supplied replay ID is invalid. Ensure that the replay ID corresponds to an event that is within the retention window and that has not been deleted. Alternatively, provide -2 to replay all events or -1 to replay only new events.
400Authenticated user id does not match the session’s user idThe CometD session in the browser is associated with more than on user. This error can occur if you’re using the Lightning Emp API component and logged in as another user using system admin login as feature. See Log In as Another User in Salesforce Help. For more details, see this knowledge article.
401Authentication invalid.The supplied authentication token or session ID is not valid. This error is returned on the /meta/handshake or the /meta/connect channel. On the /meta/handshake channel, the error is in the failureReason response field, which is nested under the ext/sfdc field. On the /meta/connect channel, the error is in the error field.
401Request requires authentication.No authentication token or session ID was supplied in the request header. The client must send authentication information. This error is returned in the handshake error response (on the /meta/handshake channel) in the failureReason response field, which is nested under the ext/sfdc field. The error field in the response also contains the following error: 403::Handshake denied.
403Cannot create channel {channel_name}The subscription channel can’t be created, which can be due to insufficient permissions.
403Subscriber does not have access to the entity in this topicThe subscriber doesn’t have access to the Salesforce object in the PushTopic.
403Subscriber does not have access to all fields referenced in the where clause of the PushTopicThe subscriber doesn’t have access to all fields referenced in the WHERE clause of the PushTopic.
403Handshake deniedThe handshake request was denied. The cause of this error is provided in the failureReason field in the response, which is nested under the ext/sfdc field.
403Client has not completed handshakeThe client has not completed a handshake. The client must perform a handshake before subscribing.
403Organization concurrent user limit exceededThe maximum number of concurrent clients across all channels has been exceeded. This error applies to any type of event, including PushTopic, generic, platform, and Change Data Capture events.
403Organization total events daily limit exceededThe maximum number of delivered event notifications within a 24-hour period to all CometD clients has been exceeded. This error applies to any type of event, including PushTopic, generic, platform, and Change Data Capture events.
403Restricted channelThe user doesn’t have the required permissions to subscribe to the streaming channel.
403User not enabled for streamingThe user doesn’t have read permission on the PushTopic.
403User not allowed to subscribe CDC without View All Data permissionsThe user must have the View All Data permission to subscribe to Change Data Capture.
403Subscription limit exceeded for this topicThe maximum number of concurrent clients per topic for PushTopic and generic events has been exceeded. This error doesn’t apply to platform events.
403Unknown clientThe server deleted the client CometD session due to a timeout, which can be caused by a network failure or by Hyperforce’s auto-scaling processes as part of elastic computing. The client must perform a new handshake and reconnect.
403To protect all customers from excessive use and Denial of Service attacks, we limit the number of simultaneous connections per server. Your request has been denied because this limit has been exceeded. Please try your request again later.Salesforce app servers enforce a limit on simultaneous connections per server to protect from excessive use and denial of service attacks. Your request has been denied because this limit has been exceeded. Try your request again later. This error is returned in a handshake response (on the /meta/handshake channel) in the failureReason response field, which is nested under the ext/sfdc field. The response also contains an error in the error field: 403::Handshake denied.
413Maximum Request Size ExceededThe maximum request size of 32,768 bytes has been exceeded.
503Server is too busy. Please try your request again later.The server can’t process your request because it is too busy. Try your request again later, or try to execute your requests serially. This error is returned in the failureReason response field, which is nested in the ext/sfdc field on channels, such as the /meta/handshake, /meta/connect, or /meta/subscribe channels. The error field in the response contains another error alongside this error.

Generic Streaming-only Errors 

The following errors are returned for generic streaming events only.

Error CodeError MessageError Description
403Unable to create channel dynamically, maximum channel limit has been exceededThe maximum number of generic streaming channels has been exceeded.
403No access on channelThe generic streaming channel can’t be accessed because the user doesn’t have permissions on the StreamingChannel object.
404channel names may not vary only by caseThe generic streaming channel exists with a different case. Generic streaming channel names are case-sensitive.
404Unknown channelThe generic streaming channel isn’t found or can’t be created dynamically.