mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Normalize ESP response and recipient status
This commit is contained in:
@@ -74,10 +74,10 @@ class AnymailRequestsBackend(AnymailBaseBackend):
|
||||
raise AnymailRequestsAPIError(email_message=message, payload=payload, response=response)
|
||||
return response
|
||||
|
||||
def deserialize_response(self, response, payload, message):
|
||||
"""Return parsed ESP API response
|
||||
def deserialize_json_response(self, response, payload, message):
|
||||
"""Deserialize an ESP API response that's in json.
|
||||
|
||||
Can raise AnymailRequestsAPIError if response is unparsable
|
||||
Useful for implementing deserialize_response
|
||||
"""
|
||||
try:
|
||||
return response.json()
|
||||
|
||||
Reference in New Issue
Block a user