Error Responses


As seen in the previous references, when a result is retuned the associative array (map) contains two elements, "result", and "resultData". Is "result" contains the string "success", then the process has performed as expected and either "resultData" will be omitted, or populated with data relevent to that operation. I.e. Entity data. However if there's been an error the "result" string will be one of the following:
Name Example Description
bean_exception_validation
array(
   "listFilterName" => 
   "name is already in use by a list or filter")
One or more validation errors occurred. Returned in the resultData is an array of strings containing the validation error messages keyed on the fields that caused the errors.
bean_exception_system
"Bean requested not found - Bean type: 
[bus_entity_context]"
A fatal system exception occurred. String description of the error that occurred.
bean_exception_security
"Attempt to write to a protected field 
[bus_entity_campaign_list::amendedBy]"
Invalid permissions for the requested action. String description of the illegal request.
So essentially, if the "result" element doesn't contain the string "success", then query both this and the "resultData" element to get more information regardin the error and how to resolve this. Common errors might include: