Skip to content

Log Mailer errors #4885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Log Mailer errors #4885

merged 1 commit into from
Jan 2, 2025

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Dec 6, 2024

Changes

This PR improves Plausible.Mailer error messages in CE.

Requested in #4844 (comment)

@ruslandoga ruslandoga mentioned this pull request Dec 6, 2024
@ruslandoga ruslandoga marked this pull request as ready for review December 6, 2024 08:48
@ruslandoga ruslandoga requested a review from a team December 6, 2024 08:48
@ruslandoga ruslandoga added the self-hosting Anything self-hosted label Dec 6, 2024
@ruslandoga ruslandoga requested a review from ukutaht December 9, 2024 15:44
@ruslandoga ruslandoga added this pull request to the merge queue Dec 18, 2024
@ruslandoga ruslandoga removed this pull request from the merge queue due to a manual request Dec 18, 2024
@ruslandoga
Copy link
Contributor Author

@ukutaht double checking if it's OK to merge?

Copy link

Preview environment👷🏼‍♀️🏗️
PR-4885

@ruslandoga ruslandoga marked this pull request as draft December 19, 2024 07:26
@ruslandoga ruslandoga changed the title Log Mailer errors in CE Log Mailer errors Dec 19, 2024
@ruslandoga ruslandoga removed the self-hosting Anything self-hosted label Dec 19, 2024
@ruslandoga ruslandoga force-pushed the log-mailer-errors-in-ce branch from 529bb35 to b7e5a5d Compare December 23, 2024 06:09
@ruslandoga ruslandoga marked this pull request as ready for review December 23, 2024 06:11
@ruslandoga ruslandoga force-pushed the log-mailer-errors-in-ce branch from b7e5a5d to 3ee5945 Compare December 23, 2024 06:13
@ruslandoga ruslandoga added this pull request to the merge queue Jan 2, 2025
Merged via the queue into master with commit 14fa39e Jan 2, 2025
8 checks passed
@ruslandoga ruslandoga deleted the log-mailer-errors-in-ce branch January 2, 2025 14:57
ruslandoga added a commit that referenced this pull request Jan 6, 2025
ruslandoga added a commit that referenced this pull request Jan 6, 2025
ruslandoga added a commit that referenced this pull request Jan 6, 2025
ruslandoga added a commit that referenced this pull request Jan 16, 2025
@ruslandoga
Copy link
Contributor Author

ruslandoga commented Mar 10, 2025

Possible fix for "hard bounce" Bamboo.ApiError Sentry flood: plausible/bamboo_postmark#3

ukutaht pushed a commit to plausible/bamboo_postmark that referenced this pull request Mar 17, 2025
This should be enough to allow Plausible.Mailer handle/suppress hard
bounces.

Maybe with something like this:

```elixir
defmodule Plausible.SentryFilter do
  # ...
  def before_send(%{original_exception: %Bamboo.PostmarkAdapter.Error{} = e} = event) do
    unless Bamboo.PostmarkAdapter.Error.is_hard_bounce(e), do: event
  end
end
```

It also fixes invalid (non-text `:message`) `Bamboo.ApiError`s.

Related:
- plausible/analytics#4885
-
https://github.com/beam-community/bamboo/blob/main/lib/bamboo/api_error.ex
- https://sentry.plausible.io/organizations/plausible/issues/756
-
https://github.com/plausible/analytics/blob/master/lib/sentry_filter.ex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants