Newer Version Available
BatchApexErrorEvent (Beta)
Represents a platform event associated with a batch Apex class. This object is
available in API version 44.0 and later.
Batch Apex classes can now opt in to 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()
Special Access Rules
Only the Salesforce Platform can fire this event, not Apex code or the API. Users with Customize Application Permission have read access.
Fields
| Field Name | Details |
|---|---|
| AsyncApexJobId |
|
| DoesExceedJobScopeMaxLength |
|
| ExceptionType |
|
| JobScope |
|
| Message |
|
| ReplayId |
|
| RequestId |
|
| StackTrace |
|
Usage
BatchApexErrorEvent records are fired 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.