Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Platform Event Error Status Codes
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.