Salesforce Fact #857 | BatchApexErrorEvent subscribe using LWC
BatchApexErrorEvent can be subscribed in LWC as well. For this, we have to import the required functions from lightning/empApi module and the channel name is '/event/BatchApexErrorEvent'. In this example, we have subscribed to the BatchApexErrorEvent using LWC and showing a toast error message on receiving the error. References: https://developer.salesforce.com/docs/component-library/bundle/lightning-emp-api/documentation https://salesforce.stackexchange.com/questions/297863/showtoast-from-messagecallback-function-of-empapi Attached are the screenshots.