1

Apex documentation has contradicting information about Second Generation(2GP) Package Apex Unhandled Exception support.

This page states that Apex exception errors don’t trigger email notifications.

While this page states that it is possible to set a user to receive unhandled apex exception email notification

-o | --errornotificationusername ERRORNOTIFICATIONUSERNAME
Optional
An active Dev Hub org user designated to receive email notifications for unhandled Apex exceptions, and install, upgrade, or uninstall failures associated with your package.
Type: string

I have confirmed that the package I created, was created with setting errornotificationusername to the correct values. Also I did receive some email notifications about installation errors.

I can't understand if the Second Generation(2GP) Package support Apex Unhandled Exception email notifications or not. Since I was able to receive email notifications about package install errors, despite the documentation specifies these are not supported either. If this is not supported, what is the purpose of setting errornotificationusername attribute?

I have seen some other issues related to Apex unhandled email exceptions not coming at all or classic packaging or unpackaged code. Am I affected by the same issue?

2
  • I have reached out to our team internally and will share more inputs as I have. Thank you
    – Swetha
    May 12 at 17:19
  • Thanks @Swetha, please let me know when you have any information on this
    – Patlatus
    May 13 at 13:20
1

Our Salesforce team has identified this reported scenario as a documentation bug. The relevant change which is removing the point Apex exception errors don’t trigger email notifications from the documentation has been done and is expected to reflect by 26/05(Safe Harbor).

Hope this clarifies.

4
  • Ok, so Apex exception errors should trigger email notifications, correct? Then why didn't I receive those expected unhandled error email notifications?
    – Patlatus
    May 19 at 10:11
  • That's correct. To be able to understand which expected email notifications weren't sent, we need more details on the scenario. I'd recommend logging a support case for further investigation.
    – Swetha
    May 19 at 10:18
  • Is premier support required for opening case like this? If so, I have to check with my client if they have it enabled
    – Patlatus
    May 19 at 10:20
  • I believe this needs Premier support @Patlatus
    – Swetha
    May 19 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.