cwmiller / broadworks-connector

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

query when user does not have the service #15

Closed TwinMist closed 6 years ago

TwinMist commented 6 years ago

Hi Are you able to fix the issue i have with the script crashing because i query something the user is not subscriber to.

PHP Fatal error: Uncaught CWM\BroadWorksConnector\Ocip\ErrorResponseException: [Error 4410] Service is not assigned to this subscriber: Authentication in /bwscripts/vendor/cwm/broadworks-connector/src/OcipClient.php:450 Stack trace:

0 /bwscripts/vendor/cwm/broadworks-connector/src/OcipClient.php(350): CWM\BroadWorksConnector\OcipClient->executeCommands(Array)

1 /bwscripts/include/getFunctions.php(245): CWM\BroadWorksConnector\OcipClient->call(Object(CWM\BroadWorksConnector\Ocip\Models\UserAuthenticationGetRequest))

cwmiller commented 6 years ago

That's an error sent by BroadWorks. Be sure to check what services the user has assigned via UserServiceGetAssignmentListRequest or assign them with UserServiceAssignListRequest before calling any service-specific request on the user.