Get Package Error Notifications

Designate an active Dev Hub org user to receive email notifications for Apex gacks, and install, upgrade, or uninstall failures associated with your packages. Use the errornotificationusername parameter when creating or updating a package in Salesforce CLI.

Where: This change applies to second-generation managed packages and unlocked packages created using Salesforce CLI or Tooling API.

Who: Users need the System Administrator profile or the Create and Update Second-Generation Packages permission.

How: In Salesforce CLI run sfdx force:package:create --errornotificationusername or sfdx force:package:update --errornotificationusername. In Tooling API, use the PackageErrorUsername field on the Package2 object.