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.
BatchApexErrorEvent
Batch Apex classes can fire platform events when encountering an error or exception. Clients listening to the event channel can tell how often it failed, which records were in scope at the time of failure, and other exception details.
Supported Calls
describeSObjects()
Supported Subscribers
| Subscriber | Supported? |
|---|---|
| Apex Triggers | ![]() |
| Flows | ![]() |
| Processes | ![]() |
| Pub/Sub API | ![]() |
| Streaming API (CometD) | ![]() |
Subscription Channel
/event/BatchApexErrorEvent
Special Access Rules
Only the Salesforce Platform can fire this event; Apex code and the API can’t. Users with Customize Application Permission have read access.
Event Delivery Allocation Enforced
Yes
Fields
| Field Name | Details |
|---|---|
| AsyncApexJobId |
|
| DoesExceedJobScopeMaxLength |
|
| EventUuid |
|
| ExceptionType |
|
| JobScope |
|
| Message |
|
| Phase |
|
| ReplayId |
|
| RequestId |
|
| StackTrace |
|
Usage
BatchApexErrorEvent messages are generated by batch Apex jobs that implement the Database.RaisesPlatformEvents interface and have unhandled Apex exceptions during processing. For more information, see the Firing Platform Events from Batch Apex.
