helpscout / helpscout-api-php

PHP Wrapper for the Help Scout API
MIT License
98 stars 62 forks source link

Exceptions now thrown when failing to encode entities #278

Closed bkuhl closed 3 years ago

bkuhl commented 3 years ago

This PR is a follow up to https://github.com/helpscout/helpscout-api-php/issues/277. While this doesn't resolve the underlying issue as to why the encoding wasn't successful, it does make the error surface more clearly. Throwing an exception is not a breaking change here because the return type expects a string, so any false return value from json_encode() will error out anyways.