Commit graph

13 commits

Author SHA1 Message Date
Martin
6a25120f80 amelioration(dolist_api): echoue avec un fail pour remonter dans notre gestion des retry 2023-02-03 17:19:36 +01:00
Martin
2de9026c13 amelioration(dolist_api): forward le message_id afin de faciliter les investigations 2023-02-03 17:19:36 +01:00
Colin Darie
ce7e674159 feat(mailer): make errors interceptable by jobs so they will retry
Comme on intercepte chaque `StandardError` pour le monitoring des mails
en erreur, l'erreur n'était plus visible par le job, et les emails
étaient perdus.

A la place on re-raise une autre erreur pour que le job échoue afin de
retry plus tard. Pour ne pas être "avalée" par le rescue_from,
cette erreur doit héritée d'`Exception` plutôt que `StandardError`.

NB: il faudrait parvenir à écrire un test pour vérifier ce comportement.

Pour être vérifié en dev, il faut activer `raise_delivery_errors`
comme en production.
2023-01-17 14:26:11 +01:00
Colin Darie
d58e6a2f9c refactor(email): remove pseudonymization, it will be done at dump-time 2023-01-10 16:07:35 +01:00
Colin Darie
b9c1799e60 refactor(mailer): shared error concern 2023-01-10 16:07:35 +01:00
Colin Darie
0a22c1d2f0 chore(email): log smtp errors 2023-01-10 16:07:35 +01:00
Colin Darie
6cb2389eef chore(email): add an observer which log the emails dispatched 2023-01-10 16:07:35 +01:00
Paul Chavard
4a4ce67ef6 fix(dossier): explicitly send draft notification email 2022-12-26 22:02:33 +00:00
Pierre de La Morinerie
970c3e4b2b specs: avoid executing business logic in Procedure factory
Calling business logic in a factory is a code-smell, because it
usually requires the object to be saved into database, and may have
unintended consequences when the business logic is changed.

Also, this allows to just build a published procedure, without saving it
to the database.
2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
e34f82a6fb mailers: ignore more SMTP errors
Although we already ignore "invalid recipient" errors, a new type
of error recently popped: the mail service responds with
> Net::SMTPServerBusy '400 unexpected recipients: want atleast 1, got 0'

We want to also ignore this kind of errors.
2020-07-13 16:17:55 +02:00
clemkeirua
4343bb3918 Revert "openly fail when not delivering mail"
This reverts commit 415cc2c2f1.
2020-02-20 15:31:43 +00:00
clemkeirua
415cc2c2f1 openly fail when not delivering mail 2020-02-05 10:46:01 +01:00
clemkeirua
7f76ab6671 disable retry sending a mail with an invalid email adress 2019-11-07 10:11:48 +01:00