If there is an error in the API request, it will let you know by sending the 'Error' status text in the 'status' field of the response. The 'msg' field in that same response will include a textual representation of the error.
stdClass Object ( [status] => Error [msg] => Unknown action )
With some requests you can send multiple items at once, e.g. PTR record updates. The request itself can be successful, but individual updates may not be. Such responses will contain an updates array where each entry includes its own 'result' field, which can be 'OK' or 'Error'.
Array ( [status] => Success [msg] => OK [data] => Array ( [updates] => Array (  => Array ( [result] => OK [msg] => PTR record for 2a00:1630:2:fff::abc is now mynewptr.example.com )  => Array ( [result] => Error [msg] => No IP address provided ) ) ) )