When a subscribed member from a list have been deleted from mailchimp (with "PERMANENTLY DELETE").
If you try to subscribe this member again, the mailchimp api response do not contain the "type" field.
e.g :
[
"title" => "Forgotten Email Not Subscribed"
"status" => 400
"detail" => test@test.com was permanently deleted and cannot be re-imported. The contact must re-subscribe to get back on the list."
"instance" => "9042d84b-3xc0-4b75-a7c7-f0efbx225328"
]
This causes an error in the "throwMailchimpError" method of the ListRepository" which expects this data :
private function throwMailchimpError(array $errorResponse)
{
$errorArray = json_decode($errorResponse['body'], true);
if (is_array($errorArray) && array_key_exists('errors', $errorArray)) {
throw new MailchimpException(
$errorArray['status'],
$errorArray['detail'],
$errorArray['type'],
$errorArray['title'],
$errorArray['errors'],
$errorArray['instance']
);
} else {
throw new MailchimpException(
$errorArray['status'],
$errorArray['detail'],
$errorArray['type'],
$errorArray['title'],
null,
$errorArray['instance']
);
}
When a subscribed member from a list have been deleted from mailchimp (with "PERMANENTLY DELETE").
If you try to subscribe this member again, the mailchimp api response do not contain the "type" field.
e.g :
This causes an error in the "throwMailchimpError" method of the ListRepository" which expects this data :
This error occurs with the version 1.3.1.