analytics icon indicating copy to clipboard operation
analytics copied to clipboard

Fix error handling for postmark.

Open manusajith opened this issue 3 years ago • 2 comments

Do not log errors to Sentry if the error code is 406(Recipient marked as inactive)

Changes

Please describe the changes made in the pull request here.

Below you'll find a checklist. For each item on the list, check one option and delete the other.

Tests

  • [ ] Automated tests have been added
  • [ ] This PR does not require tests

Changelog

  • [ ] Entry has been added to changelog
  • [ ] This PR does not make a user-facing change

Documentation

  • [ ] Docs have been updated
  • [ ] This change does not need a documentation update

Dark mode

  • [ ] The UI has been tested both in dark and light mode
  • [ ] This PR does not change the UI

manusajith avatar Jul 26 '22 01:07 manusajith

BundleMon

Unchanged files (7)
Status Path Size Limits
:white_check_mark: static/css/app.css
515.1KB -
:white_check_mark: static/js/dashboard.js
287.64KB -
:white_check_mark: static/js/app.js
12.13KB -
:white_check_mark: static/js/embed.host.js
5.58KB -
:white_check_mark: static/js/embed.content.js
5.06KB -
:white_check_mark: tracker/js/plausible.js
748B -
:white_check_mark: static/js/applyTheme.js
314B -

No change in files bundle size

Final result: :white_check_mark:

View report in BundleMon website ➡️


Current branch size history | Target branch size history

bundlemon[bot] avatar Jul 26 '22 01:07 bundlemon[bot]

@vinibrsl's comment seems on point.

The two functions in that module used to do different things - one would reraise the error and the other would swallow it. Both are reported to Sentry though.

This PR keeps the two different function definitions, but removes the distinction between them (neither uses reraise anymore). In order to integrate this change, I see one of two options:

  1. Bring back the distinction and keep the old reraise behaviour
  2. Verify that the change does not impact user experience negatively wherever the send_email without safe was used. If reraise doesn't add any value, then I'm OK with removing the distinction between these two functions. But that needs to be a bigger refactor because in the current state we have two functions that do exactly the same thing and that's very confusing to someone who is not familiar with the history. So if we remove the reraise, this module should have only one function, not two, and all the callsites of send_email need to be updated.

ukutaht avatar Jul 29 '22 16:07 ukutaht