From ee511a260af06c18c459034d3799650499db5061 Mon Sep 17 00:00:00 2001 From: Derich Pacheco Date: Fri, 17 May 2024 18:15:59 -0300 Subject: [PATCH] chore: bump to v1.1.0 (#89) --- examples/batch_email_send.py | 9 ++++++++- resend/version.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/batch_email_send.py b/examples/batch_email_send.py index 462749e..6b6c32c 100644 --- a/examples/batch_email_send.py +++ b/examples/batch_email_send.py @@ -2,6 +2,7 @@ from typing import List import resend +import resend.exceptions if not os.environ["RESEND_API_KEY"]: raise EnvironmentError("RESEND_API_KEY is missing") @@ -22,6 +23,12 @@ }, ] -emails = resend.Batch.send(params) +try: + emails = resend.Batch.send(params) +except resend.exceptions.ResendError as e: + print("Failed to send batch emails") + print(f"Error: {e}") + exit(1) + for email in emails: print(f"Email sent with id: {email.id}") diff --git a/resend/version.py b/resend/version.py index 6f99d14..d011c8a 100644 --- a/resend/version.py +++ b/resend/version.py @@ -1,4 +1,4 @@ -__version__ = "1.0.2" +__version__ = "1.1.0" def get_version() -> str: