When the PostNL webservice returns an error, I'm getting undefined notices because the ExceptionData is not an array.
Notice Error: Trying to get property 'Description' of non-object in [/var/www/html/app/Vendor/dividebv/postnl/src/Postnl.php, line 566]
Notice Error: Trying to get property 'ErrorMsg' of non-object in [/var/www/html/app/Vendor/dividebv/postnl/src/Postnl.php, line 567]
Notice Error: Trying to get property 'ErrorNumber' of non-object in [/var/www/html/app/Vendor/dividebv/postnl/src/Postnl.php, line 568]
Notice Error: Trying to get property 'Description' of non-object in [/var/www/html/app/Vendor/dividebv/postnl/src/Postnl.php, line 566]
Notice Error: Trying to get property 'ErrorMsg' of non-object in [/var/www/html/app/Vendor/dividebv/postnl/src/Postnl.php, line 567]
Notice Error: Trying to get property 'ErrorNumber' of non-object in [/var/www/html/app/Vendor/dividebv/postnl/src/Postnl.php, line 568]
Notice Error: Trying to get property 'Description' of non-object in [/var/www/html/app/Vendor/dividebv/postnl/src/Postnl.php, line 566]
Notice Error: Trying to get property 'ErrorMsg' of non-object in [/var/www/html/app/Vendor/dividebv/postnl/src/Postnl.php, line 567]
Notice Error: Trying to get property 'ErrorNumber' of non-object in [/var/www/html/app/Vendor/dividebv/postnl/src/Postnl.php, line 568]
Debugging shows that $exception (HERE) has the following data:
SoapFault {#64
#message: "Check CIFException in the detail section"
#code: 0
#file: "./app/Vendor/dividebv/postnl/src/LabellingClient.php"
#line: 59
+"faultstring": "Check CIFException in the detail section"
+"faultcode": "s:CIF Framework Message Interceptor"
+"detail": {#60
+"CifException": {#61
+"Errors": {#62
+"ExceptionData": {#63
+"Description": null
+"ErrorMsg": "Validation failed for shipment: xxxx, Messages: xxx: {[xxxx] Receiver Street is required}"
+"ErrorNumber": "1003"
}
}
}
}
trace: {
./app/Vendor/dividebv/postnl/src/LabellingClient.php:59 { ā¦}
}
}
When the PostNL webservice returns an error, I'm getting undefined notices because the
ExceptionData
is not an array.Debugging shows that
$exception
(HERE) has the following data: