Skip to content

Commit 88738cd

Browse files
committed
better email error
1 parent 5d7aab4 commit 88738cd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/backend/src/lib/emails.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,12 @@ export async function sendEmail(options: SendEmailOptions) {
253253
from: options.emailConfig.senderEmail,
254254
to: options.to,
255255
subject: options.subject,
256-
cause: result.error.rawError,
256+
error: result.error,
257257
};
258258

259259
if (result.error.canRetry) {
260-
console.warn("Failed to send email, but error is possibly transient so retrying.", extraData, result.error.rawError);
261-
return Result.error(result.error);
260+
console.warn("Failed to send email, but error is possibly transient so retrying.", extraData, result.error.rawError);
261+
return Result.error(result.error);
262262
}
263263

264264
// TODO if using custom email config, we should notify the developer instead of throwing an error

0 commit comments

Comments
 (0)