5

Several months ago, we noticed that our production org was not sending exception emails though we regularly were able to generate an exception email in sandboxes. We filed a case with support and after working with them, we found some unrelated deliverability issues but nothing tied to exception emails. This case was closed for being out of scope.

To rectify the deliverability issues, we went through the normal troubleshooting steps for email deliverability. We confirmed the following:

  1. Salesforce email deliverability best practices were properly configured.
  2. Exception emails were configured to send to the correct people.
  3. These users were configured to receive exception emails at a user level.

After another round of testing, we filed a second case with Salesforce support. With Salesforce supports assistance, we were able to confirm that our production org was not triggering exception emails with the exceptions we were using to test. There was some back and forth that this could be related to Known Issue W-1311052.

Knowing this could be a possibility based on what we were using to test, we ended up writing a method that would would cause a new unhandled exception in production. This method was testing in sandbox and an exception email was sent as expected. When the method was run in production, the unhandled exception was thrown but no email was sent and this was further confirmed by the email deliverability team. Tier 3 Support was able to check internal MTA logs to confirm that no email was triggered and it was confirmed at that point that our production org was not triggering emails to be sent during unhandled exceptions.

At this point, we were notified that this error was related to Apex, and that we currently do not have Premier Support so the case was closed for being out of scope. We tried explaining on multiple occasions to anyone who would listen that the unhandled exception emails are not something our custom code sends and its sent from Salesforce but to no avail.

My questions for this community:

  1. Has anyone else experienced this issue?
  2. Are their any suggestions of things we could try in regards to receiving these emails? (I'm primarily concerned about unhandled exceptions. We have the ability to monitor handled exceptions at the moment)
  3. Does anyone have any suggestions around getting around the Premier Support paywall? When I worked at an ISV, this was never an issue but now that I am a customer, support is more of a hindrance than a helper.
  • 5
    I'll see if we're experiencing the issue, and if so, I can raise a case as a Premier Support customer. – sfdcfox Jul 14 at 15:01
  • 2
    Did you try simply using a flow to generate an exception, rather than Apex code? Perhaps that would be a way to step around this (very annoying) habit of Salesforce ignoring issues raised by folks without "appropriate support"... – Phil W Jul 14 at 16:28
  • 1
    @PhilW - We do get flow application errors emails just fine. Thanks for the suggestion. Something I will look into. – BrBarr Jul 14 at 16:34
  • #3 - try posting to Trailblazer forums (Collaboration tab). You can login as a customer via your org. Product mgrs read these and you might get some assistance. If it's a documented known issue, your only pathway to quicker resolution is to escalate via your account manager. – identigral Jul 15 at 5:41
2

Has anyone else experienced this issue?

Yes. I've seen this previously with Apex Exception emails in When are unhandled exception emails suppressed and not sent? or Why do I not always get exception emails even though I've set them up?

I believe the answer there still stands. You won't currently get one-to-one emails for every unhandled Apex exception and the mechanism that determines which exceptions get suppressed and which get sent is currently not publicly documented.

Are their any suggestions of things we could try in regards to receiving these emails? (I'm primarily concerned about unhandled exceptions. We have the ability to monitor handled exceptions at the moment)

At this stage the only mechanism I know of to catch unhandled exceptions are Transaction Finalizers on Queueables. These provide a post transaction point that will detect the exception that terminated execution.

Does anyone have any suggestions around getting around the Premier Support paywall?

That is a much more complicated issue that I don't think we can fully address here. There are a number of community members that continue to advocate to Salesforce for improving the support for development related bugs without needing to pay for Premier support. It is often raised in places like Meet the Developers and True to the Core at various conferences.

| improve this answer | |
  • 1
    I believe we ruled out the apex exception email suppression as being the culprit (unless it suppressing everything). We created new classes with new exceptions during testing and nothing was ever sent in production but regularly received them in our sandbox. – BrBarr Jul 16 at 14:45

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.