Skip to content

To gracefully handler errors in execute of a batch apex and store a lot more information about the error

Notifications You must be signed in to change notification settings

biswajith-s-pso-maxval/batch-apex-error-handling

 
 

Repository files navigation

Batch Apex Error Handling

In Spring '21 Salesforce released the BatchApexErrorEvent to allow developers to get information on failing batch classes. Get your errors by email or store them in a custom object. Customize your error handling by class.

Features

  • Email batch errors to an admin or support team for evaluation and processing
  • Store batch errors in a custom object including the class that failed, full stack trace, and the records that were in the batch.

Setup Instructions

  1. Deploy the contents of this repo into your org.
  2. Implement Database.RaisesPlatformEvents on any batch class where you want to add error handling.
  3. Setup at least one org wide email address
  4. Setup the Batch Apex Error Settings from the Custom Settings section in Setup

About

To gracefully handler errors in execute of a batch apex and store a lot more information about the error

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Apex 100.0%