Open dave470003 opened 5 years ago
Even though their API says they'll only return JSON, they will sometimes return HTML if it's a 500 error. In this situation, we should throw a different error message rather than falling back to 'JSON response could not be decoded.'
https://github.com/snowcap/Emarsys/blob/3ca864f658a26f6da2c0b7d9037f5b384e0c71c7/src/Snowcap/Emarsys/Client.php#L914
Even though their API says they'll only return JSON, they will sometimes return HTML if it's a 500 error. In this situation, we should throw a different error message rather than falling back to 'JSON response could not be decoded.'
https://github.com/snowcap/Emarsys/blob/3ca864f658a26f6da2c0b7d9037f5b384e0c71c7/src/Snowcap/Emarsys/Client.php#L914