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 cannot. 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 Apex Developer Guide.