-
Notifications
You must be signed in to change notification settings - Fork 31
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
Refactoring: améliore la gestion des erreurs des followups #4652
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quelques petites modifications, je pense que je vais devoir adapter l'autre PR sur le sujet ou l'annuler.
} else { | ||
return createSimulationRecapUrl(req, res) | ||
if (phone) await sendSimulationResultsSms(followup) | ||
if (email) await sendSimulationResultsEmail(followup) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'aurais inversé, d'abord l'e-mail et ensuite le téléphone car plus de chance que le premier fonctionne.
On pourra aussi adapter le message en mode erreur avec le numéro de téléphone, l'email a bien été envoyer ressayer plus tard ou un truc du genre.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Peut-être dans un second temps, faire les deux envois séparément avec des messages dédiés à chaque service (ex: "l'email a bien été envoyé", puis "Le sms a bien été envoyé") ?
@@ -228,6 +223,6 @@ export async function logSurveyLinkClick(req: Request, res: Response) { | |||
} catch (error) { | |||
Sentry.captureException(error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
À postériori, je me demande si le captureException et le console error est pertinent, sachant qu'on ne retrouve plus le survey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le console.error c'est sûr qu'il n'est pas utile. Le captureException, comme tu avais pris l'initiative de l'ajouter, je te laisse décider si tu souhaites le retirer. Je l'aurais aussi enlevé de mon côté
PR intermédiaire à #4648 / #4643