mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-21 12:21:06 -05:00
Cleanup Djrill exceptions
* Add common base DjrillException * Simplify backend by moving logic to describe errors into base DjrillException * Add NotSerializableForMandrillError for JSON serialization errors
This commit is contained in:
@@ -392,3 +392,15 @@ Exceptions
|
||||
`API error log <https://mandrillapp.com/settings/api>`_ to view the full API
|
||||
request and error response.)
|
||||
|
||||
|
||||
.. exception:: djrill.NotSerializableForMandrillError
|
||||
|
||||
The send call will raise a :exc:`~!djrill.NotSerializableForMandrillError` exception
|
||||
if the message has attached data which cannot be serialized to JSON for the Mandrill API.
|
||||
|
||||
See :ref:`formatting-merge-data` for more information.
|
||||
|
||||
.. versionadded:: 2.0
|
||||
Djrill 1.x raised a generic `TypeError` in this case.
|
||||
:exc:`~!djrill.NotSerializableForMandrillError` is a subclass of `TypeError`
|
||||
for compatibility with existing code.
|
||||
|
||||
Reference in New Issue
Block a user