Newer Version Available

This content describes an older version of this product. View Latest

Platform Event Error Status Codes

When publishing an event message results in an error, a status code is returned in the SaveResult or in an event notification.

Synchronous Errors

The following error status codes are returned immediately in the publish call result.

LIMIT_EXCEEDED
The number of published platform event messages exceeded the hourly publishing limit or the test limit for event messages published from an Apex test context.
PLATFORM_EVENT_PUBLISHING_UNAVAILABLE
Publishing platform event messages failed because a service was temporarily unavailable. Try again later.
PLATFORM_EVENT_ENCRYPTION_ERROR
The platform event messages could not be published due to a problem with encryption. A misconfiguration in your Salesforce org or a general encryption service error can cause this problem.

In Apex, the status code is returned in the Database.SaveResult in the Database.Error object. In SOAP API, the status code is returned in the SaveResult object. In REST API, the status code is returned in the errors field in the JSON message.

Asynchronous Errors

To receive asynchronous errors, subscribe to PublishStatusEvent. For more information, see Get the Status of Asynchronous Platform Event Publish Operations (Beta).

The following status code is returned when the asynchronous publish operation of a high-volume platform event fails.

PLATFORM_EVENT_PUBLISH_FAILED
The platform event message could not be published after one or more attempts because of a system error. Try again later.