Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
how to get soap fault exception codes
I'm trying to catch exceptions thrown when a soap api uses an invalid login credential using PHP toolkit.
The following code doesn not print either the message or the code :
catch(Exception $e) {
print $e->getMessage() . '<br />' . $e->getCode();
die;
}
however if I dump the $e exception, I get this whole object :
object(SoapFault)#10 (10) {
["message":protected]=>
string(56) "You have entered an invalid password. Please try again."
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(66) "***/PHP_Toolkit/rokutest/PHPtoolkit.php"
["line":protected]=>
int(1638)
["trace":"Exception":private]=>
array(3) {
0