mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-18 16:57:22 +02:00
🪵 Log error message from failed email (#693)
This commit is contained in:
parent
1bc749e17a
commit
43757becc6
1 changed files with 1 additions and 4 deletions
|
@ -81,7 +81,6 @@ type SendEmailOptions<T extends TemplateName> = {
|
|||
to: string;
|
||||
subject: string;
|
||||
props: TemplateProps<T>;
|
||||
onError?: () => void;
|
||||
};
|
||||
|
||||
export const sendEmail = async <T extends TemplateName>(
|
||||
|
@ -107,10 +106,8 @@ export const sendEmail = async <T extends TemplateName>(
|
|||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
html,
|
||||
});
|
||||
return;
|
||||
} catch (e) {
|
||||
console.error("Error sending email", templateName, e);
|
||||
options.onError?.();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -120,6 +117,6 @@ export const sendRawEmail = async (options: Mail.Options) => {
|
|||
await transport.sendMail(options);
|
||||
return;
|
||||
} catch (e) {
|
||||
console.error("Error sending email");
|
||||
console.error("Error sending email", e);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue