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 either 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.

The status code can be returned in Apex in the Database.SaveResult in the Database.Error object. In SOAP API, it’s returned in the SaveResult object. In REST API, the status code is returned in the errors field in the JSON message.

Asynchronous Errors

An asynchronous error occurs after the publish call returns. It’s sent as a notification on the /event/AsyncOperationEvent channel. To receive asynchronous errors, subscribe to the channel. For more information, see Get Notified of Asynchronous Publish Errors (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.