analytics
analytics copied to clipboard
Fix error handling for postmark.
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
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 ➡️
@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:
- Bring back the distinction and keep the old
reraisebehaviour - Verify that the change does not impact user experience negatively wherever the
send_emailwithoutsafewas used. Ifreraisedoesn'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 thereraise, this module should have only one function, not two, and all the callsites ofsend_emailneed to be updated.