Skip to content

Commit 79b38c5

Browse files
committed
Fix exception handling when checking list subscription.
1 parent 08fe7fe commit 79b38c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/MailchimpLists.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,7 @@ public function getListsForEmail($email) {
583583
if ($e->getCode() !== 404) {
584584
// 404 indicates the email address is not subscribed to this list
585585
// and can be safely ignored. Surface all other exceptions.
586-
throw new MailchimpAPIException($e->getResponse()
587-
->getBody(), $e->getCode(), $e);
586+
throw new MailchimpAPIException($e->getMessage(), $e->getCode(), $e);
588587
}
589588
}
590589
}

0 commit comments

Comments
 (0)