From 7788da14e57061020b4b0512e627aa583e809396 Mon Sep 17 00:00:00 2001 From: vato007 Date: Wed, 23 Apr 2025 14:58:12 +0930 Subject: [PATCH] Remove redundant try catch --- contact-email-worker/src/index.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/contact-email-worker/src/index.ts b/contact-email-worker/src/index.ts index 0e1a999..391a8ac 100644 --- a/contact-email-worker/src/index.ts +++ b/contact-email-worker/src/index.ts @@ -42,15 +42,11 @@ Mobile: ${formatEmptyString(mobile)} Message: ${message}`, }); - try { - const cfMessage = new EmailMessage( - "contact@michaelpivato.dev", - "contact@michaelpivato.dev", - msg.asRaw() - ); - this.ctx.waitUntil(this.env.SEB.send(cfMessage)); - } catch (e) { - throw e; - } + const cfMessage = new EmailMessage( + "contact@michaelpivato.dev", + "contact@michaelpivato.dev", + msg.asRaw() + ); + this.ctx.waitUntil(this.env.SEB.send(cfMessage)); } }