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, the returned SaveResult contains the error with a status code.
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 due to a service being 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.