original_string: private function validateJsonResponse($responseBody)
      {
          $data = json_decode($responseBody);
  
          if (json_last_error() !== JSON_ERROR_NONE) {
              throw new \Exception('Error decoding JSON.');
          }
  
          if (isset($data->error)) {
              throw new \Exception($data->error->error_message);
          }
  
          if (empty($data)) {
              throw new \Exception('No results found.');
          }
  
          return $responseBody;
      }
code: private function validateJsonResponse($responseBody)
      {
          $data = json_decode($responseBody);
  
          if (json_last_error() !== JSON_ERROR_NONE) {
              throw new \Exception('Error decoding JSON.');
          }
  
          if (isset($data->error)) {
              throw new \Exception($data->error->error_message);
          }
  
          if (empty($data)) {
              throw new \Exception('No results found.');
          }
  
          return $responseBody;
      }
code_tokens: private function validateJsonResponse ( $ responseBody ) { $ data = json_decode ( $ responseBody ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { throw new \ Exception ( 'Error decoding JSON.' ) ; } if ( isset ( $ data -> error ) ) { throw new \ Exception ( $ data -> error -> error_message ) ; } if ( empty ( $ data ) ) { throw new \ Exception ( 'No results found.' ) ; } return $ responseBody ; }
docstring: Parses the response content for the JSON output format
  
  @param string $responseBody
  
  @return string
  @throws \Exception
docstring_tokens: Parses the response content for the JSON output format