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?