mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 11:51:05 -05:00
@@ -1,11 +1,12 @@
|
||||
from requests import HTTPError
|
||||
|
||||
|
||||
class MandrillAPIError(HTTPError):
|
||||
"""Exception for unsuccessful response from Mandrill API."""
|
||||
def __init__(self, status_code, response=None, log_message=None):
|
||||
super(MandrillAPIError, self).__init__()
|
||||
def __init__(self, status_code, response=None, log_message=None, *args, **kwargs):
|
||||
super(MandrillAPIError, self).__init__(*args, **kwargs)
|
||||
self.status_code = status_code
|
||||
self.response = response # often contains helpful Mandrill info
|
||||
self.response = response # often contains helpful Mandrill info
|
||||
self.log_message = log_message
|
||||
|
||||
def __str__(self):
|
||||
@@ -22,8 +23,8 @@ class NotSupportedByMandrillError(ValueError):
|
||||
|
||||
This is typically raised when attempting to send a Django EmailMessage that
|
||||
uses options or values you might expect to work, but that are silently
|
||||
ignored by or can't be communicated to Mandrill's API. (E.g., unsupported
|
||||
attachment types, multiple bcc recipients.)
|
||||
ignored by or can't be communicated to Mandrill's API. (E.g., non-HTML
|
||||
alternative parts.)
|
||||
|
||||
It's generally *not* raised for Mandrill-specific features, like limitations
|
||||
on Mandrill tag names or restrictions on from emails. (Djrill expects
|
||||
|
||||
Reference in New Issue
Block a user