From 4a52a71956a8d46fcb7294ac71734504bb09bcc2 Mon Sep 17 00:00:00 2001 From: S. Solomon Darnell Date: Fri, 28 Mar 2025 21:52:21 -0500 Subject: two version of R2R are here --- .../sendgrid/helpers/mail/exceptions.py | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .venv/lib/python3.12/site-packages/sendgrid/helpers/mail/exceptions.py (limited to '.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/exceptions.py') diff --git a/.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/exceptions.py b/.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/exceptions.py new file mode 100644 index 00000000..cbc31134 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/exceptions.py @@ -0,0 +1,65 @@ +################################################################ +# Various types of extensible Twilio SendGrid related exceptions +################################################################ + + +class SendGridException(Exception): + """Wrapper/default SendGrid-related exception""" + pass + + +class ApiKeyIncludedException(SendGridException): + """Exception raised for when Twilio SendGrid API Key included in message text""" + + def __init__(self, + expression="Email body", + message="Twilio SendGrid API Key detected"): + """Create an exception for when Twilio SendGrid API Key included in message text + + :param expression: Input expression in which the error occurred + :type expression: string + :param message: Explanation of the error + :type message: string + """ + self._expression = None + self._message = None + + if expression is not None: + self.expression = expression + + if message is not None: + self.message = message + + @property + def expression(self): + """Input expression in which the error occurred + + :rtype: string + """ + return self._expression + + @expression.setter + def expression(self, value): + """Input expression in which the error occurred + + :param value: Input expression in which the error occurred + :type value: string + """ + self._expression = value + + @property + def message(self): + """Explanation of the error + + :rtype: string + """ + return self._message + + @message.setter + def message(self, value): + """Explanation of the error + + :param value: Explanation of the error + :type value: string + """ + self._message = value -- cgit v1.2.3