cwmiller / broadworks-connector

Simple library for connecting to BroadWorks OCI-P API
MIT License
8 stars 5 forks source link

Stop fatal eror #22

Closed TwinMist closed 5 years ago

TwinMist commented 5 years ago

Hi. Is there away for it not to throw a fatal error, which cause a script to exit, where there is a error in the code

PHP Fatal error: Uncaught CWM\BroadWorksConnector\Ocip\BadResponseException: Response doesn't begin with a BroadsoftDocument element.

thanks

TwinMist commented 5 years ago

Hi. is there any update on how to stop fatal errors. if you run the code again it works fine. It is like it errors some times when you are running large long querys. ie UserGetRequest20 for all users on the system thanks

cwmiller commented 5 years ago

I tried it out for myself doing several requests in a row via TCP and also had the BadResponseException thrown. I'm still looking into exactly what is going on. It happened to me after the same amount of requests each time, and what triggered it was a newline before the XML in the response from the server. I'm not sure yet if this is a quirk with BroadWorks or just an issue with TCPTransport.

cwmiller commented 5 years ago

I think I've fixed this. Upgrade to version 2.1.2.

TwinMist commented 5 years ago

Spot on. Not crashing now. Nice work :-)