TASK22224: nextauth notify try-catch micro-refactor
This commit is contained in:
@@ -139,8 +139,8 @@ const authOptions = (req, res) => {
|
||||
process.env.NOTIFY_API_KEY
|
||||
);
|
||||
|
||||
await notifyClient
|
||||
.sendEmail(
|
||||
try {
|
||||
await notifyClient.sendEmail(
|
||||
effectiveLocale === "cy"
|
||||
? templateIdcy
|
||||
: templateId,
|
||||
@@ -149,8 +149,10 @@ const authOptions = (req, res) => {
|
||||
personalisation,
|
||||
reference
|
||||
}
|
||||
)
|
||||
.catch((error) => consoleLogger(error));
|
||||
);
|
||||
} catch (error) {
|
||||
consoleLogger(error);
|
||||
}
|
||||
}
|
||||
})
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user