Error Reporting

‹ BACK TO API PAGE


Description

Errors that occur as a result of improperly passed credentials or required fields return an error=1 response along with additional information specific to the error. The error message is defined as follows:

Field Description Example
methodName The name of the method whose invocation resulted in the error. legacy.group_clear
error Will always equal '1'. 1
responseText Human-readable reason for the error. Missing variables
responseData Method-specific and condition-specific reason for the error in XML format.
responseNum The ordinal number of the response in the case that multiple method calls were POSTed in the same API call. The number represented in this element corresponds to the order in the sequence that the method was called. 1
totalRequests The total number of method calls contained within the original POST. 1
totalCompleted The total number of completed method calls. 1

If there are multiple method calls contained within a single POST, the default behavior is to cease further execution of any method calls following the call that resulted in the error. However, if the value of the <no_halt> element is set to '1', then the system will continue processing the remaining methods in the POST. Read more about how to set the value for the no_halt element.

If there were multiple method calls in a single POST, the error message will be contained in the method's response message along with the responses of the other method calls.

If an incorrect method name is included in the POST, then the <responseText> passed back in the returned message will be "Incorrect Action Specified".

In the example below the required 'group_id' field was not provided in the API call:

<methodResponse>

<item>

<methodName>legacy.group_clear</methodName>

<error>1</error>

<responseText>Missing variables</responseText>

<responseData>

<missing_vars>group_id</missing_vars>

</responseData>

<responseNum>1</responseNum>

<totalRequests>1</totalRequests>

<totalCompleted>0</totalCompleted>

</item>

</methodResponse>

If on the rare occasion the BlueHornet system returns a success HTTP status code (i.e. 2xx) but does not return a response message, or returns an XML-formatted message that cannot be successfully parsed, treat this condition as a system error condition. Immediately suspend all method calls to the BlueHornet system, save your method calls to a queue which can be re-enabled once service has been restored, and contact your BlueHornet Account Manager.

NOTE: DO NOT resubmit API method calls unless you have (1) verified an actual input error by successfully parsing the XML-formatted method response which contains the 1 element, and (2) corrected the input error according the response code and description of the error message.


Back to API Reference Guide