From fe10869ca0af0b7a91b705095c4361c88a6b8f79 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Thu, 20 Aug 2020 00:31:49 +0200 Subject: [PATCH] fix typo when checking for sendgrid errors --- helpers/mail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/mail.js b/helpers/mail.js index b2ee7f4..88d98a2 100644 --- a/helpers/mail.js +++ b/helpers/mail.js @@ -23,7 +23,7 @@ async function sendMail(data) { } const response = await fetch(SENDGRID_URL, fetchOptions) - if (!repsonse.ok) { + if (!response.ok) { throw new Error( `Failed to send booking ${data._id} to booking admin with status ${response.status}: ${response.statusText}` )