pardot
pardot copied to clipboard
404 throws RuntimeException instead of RequestException
Upon submitting a request to search for a list membership for a prospect, where no such membership exists I am finding it returns a 404, but rather than this being wrapped in a RequestException like the docs say, it is throwing a RunTimeException which makes it impossible to ascertain the status code as there is no way to get at the status code (even though it is there in the exception object)
PHP message: HGG\Pardot\Exception\RuntimeException Object
(
[url:protected] => /api/listMembership/version/3/do/read
[parameters:protected] => Array
(
[api_key] => REDACTED
[user_key] => REDACTED
[format] => json
[output] => full
[prospect_id] => REDACTED
[list_id] => REDACTED
)
[message:protected] => Client error response
[status code] 404
[reason phrase] Not Found
[url] https://pi.pardot.com/api/listMembership/version/3/do/read
Hey @aaronlp, thanks for reporting this!
Would you be willing to figure this one out and submit a PR? I no longer have access to a Pardot account and cannot test it, so any help would be hugely appreciated.
Thanks