protected function getError($response_data, $status) {
    if (!empty($response_data->error)) {
      $error = $response_data->error;
      $message = sprintf('%s %s: %s',
        $error->statuscode,
        $error->statusdesc,
        $error->errormessage);
    }
    else {
      $message = sprintf('Error code: %s. No reason was given by Pingdom for the error.', $status);
    }
    return $message;
  }
protected function getError($response_data, $status) {
    if (!empty($response_data->error)) {
      $error = $response_data->error;
      $message = sprintf('%s %s: %s',
        $error->statuscode,
        $error->statusdesc,
        $error->errormessage);
    }
    else {
      $message = sprintf('Error code: %s. No reason was given by Pingdom for the error.', $status);
    }
    return $message;
  }
protected function getError ( $ response_data , $ status ) { if ( ! empty ( $ response_data -> error ) ) { $ error = $ response_data -> error ; $ message = sprintf ( '%s %s: %s' , $ error -> statuscode , $ error -> statusdesc , $ error -> errormessage ) ; } else { $ message = sprintf ( 'Error code: %s. No reason was given by Pingdom for the error.' , $ status ) ; } return $ message ; }
Gets the human-readable error message for a failed request.

@param object $response_data
The object containing the response data.
@param int $status
The HTTP status code.

@return string
The error message.
Gets the human - readable error message for a failed request .