Skip to content

Commit

Permalink
Delivery type
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 22, 2024
1 parent 3d1fa53 commit 903b58c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions apps/dashboard/jobs/tasks/invoice/email/send-email.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,16 @@ export const sendInvoiceEmail = schemaTask({
),
});

logger.info("Invoice email sent", {
invoiceId,
response,
});
if (response.error) {
logger.error("Invoice email failed to send", {
invoiceId,
error: response.error,
});

throw new Error("Invoice email failed to send");
}

logger.info("Invoice email sent");

await supabase
.from("invoices")
Expand Down

0 comments on commit 903b58c

Please sign in to comment.