original_string: protected function handle($result, $httpCode)
      {
          // Check for non-OK statuses
          $codes = explode(",", static::ACCEPTED_CODES);
  
          if (!in_array($httpCode, $codes)) {
              // Decode JSON if possible, if this can't be decoded...something fatal went wrong
              // and we will just return the entire body as an exception.
              if ($error = json_decode($result, true)) {
                  $error = $error['error'];
              } else {
                  $error = $result;
              }
  
              throw new \Clickatell\ClickatellException($error);
          } else {
              return json_decode($result, true);
          }
      }
code: protected function handle($result, $httpCode)
      {
          // Check for non-OK statuses
          $codes = explode(",", static::ACCEPTED_CODES);
  
          if (!in_array($httpCode, $codes)) {
              // Decode JSON if possible, if this can't be decoded...something fatal went wrong
              // and we will just return the entire body as an exception.
              if ($error = json_decode($result, true)) {
                  $error = $error['error'];
              } else {
                  $error = $result;
              }
  
              throw new \Clickatell\ClickatellException($error);
          } else {
              return json_decode($result, true);
          }
      }
code_tokens: protected function handle ( $ result , $ httpCode ) { // Check for non-OK statuses $ codes = explode ( "," , static :: ACCEPTED_CODES ) ; if ( ! in_array ( $ httpCode , $ codes ) ) { // Decode JSON if possible, if this can't be decoded...something fatal went wrong // and we will just return the entire body as an exception. if ( $ error = json_decode ( $ result , true ) ) { $ error = $ error [ 'error' ] ; } else { $ error = $ result ; } throw new \ Clickatell \ ClickatellException ( $ error ) ; } else { return json_decode ( $ result , true ) ; } }
docstring: Handle CURL response from Clickatell APIs
  
  @param string $result   The API response
  @param int    $httpCode The HTTP status code
  
  @throws Exception
  @return array
docstring_tokens: Handle CURL response from Clickatell APIs