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
   "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 requested not found - Bean type: 
A fatal system exception occurred. String description of the error that occurred.
"Attempt to write to a protected field 
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: