-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
REST-API/src/FreshMail/Client.php
Line 77 in 053b7ec
| throw new \FreshMail\ApiV2\ClientException(sprintf('Connection error, error message: '.$exception->getMessage())); |
\FreshMail\ApiV2\ClientException only holds a message such as:
Connection error, error message: Client error: `POST https://api.freshmail.com/rest/subscriber/add` resulted in a `422 Unprocessable Entity` response:
{"status":"ERROR","errors":[{"message":"Subscribers already exists in this subscribers list","code":1304}]}
This is not much use for handling this exception in code, as the exception code 1304 is not directly provided on the \FreshMail\ApiV2\ClientException object. It is only a part of the message string.
It would be tremendously useful if the code was easily accessible on the exception object as simple integer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels