/**
  * Function to take the response object and return 
  * an array of errors
  * 
  * @param  Trucker\Responses\Response $response - response object
  * @return array - array of string error messages
  */
 public function parseErrors(\Trucker\Responses\Response $response)
 {
     $result = $response->parseResponseStringToObject();
     $error_key = Config::get('error_handler.errors_key');
     if (property_exists($result, $error_key)) {
         return $result->errors;
     } else {
         throw new \InvalidArgumentException("Error key [{$error_key}] does not exist in response");
     }
 }
 /**
  * Function to take the response object and return 
  * an array of errors
  * 
  * @param  Trucker\Responses\Response $response - response object
  * @return array - array of string error messages
  */
 public function parseErrors(\Trucker\Responses\Response $response)
 {
     $result = $response->parseResponseStringToObject();
     return $result;
 }