Error Code Formatting
There are many reasons for errors being returned from the Extend API like invalid parameter data, denied access privileges, incorrect account information, and many more. All errors, no matter their type, are returned in the same format which makes parsing them very easy and consistent. Below a sample request followed by the fault that would be returned.
In this request you can see that there is invalid data passed in for the extension parameter. This will result in an error and return the error along with the unique code for that error and an error message.
<request method="switchvox.extensions.getInfo"> <parameters> <extensions> <extension>asdf</extension> </extensions> </parameters> </request>
Sample Error Returned
<response method="switchvox.extensions.getInfo"> <errors> <error code="10010" message="Invalid extension (asdf). Extensions may only contain digits or *." /> </errors> </response>