I'm wondering if there's way to store the errors produced by the php wrapper library, rather than having them automatically thrown to the browser. I can check for existing users and deal with it that way, but there might be other errors I don't need the user seeing, and it breaks the rest of my page.
Constant Contact HTTP Request Exception: Error 409: Email address firstname.lastname@example.org is already a contact
Like I said I can check for this, but I don't want anything like the above output to the browser.
I'm using the following and tried using ob_start() and ob_get_contents() to prevent this but the class itself throws there error and kills everything else.
$NewContact = $ConstantContact->addContact($Contact);
Is there a setting I'm missing?
Thanks in advance,
Sorry, but the wrapper was only configured to throw errors to the browser. You'd have to really dig into error handling in the wrapper to suppress all errors. I can say that the 409 (duplicate entry) and 400 errors are by far the most common errors, so if you account for those in your code, you likely won't see many other types of errors.
API Support Specialist