private function checkResult($result)
  {
      $this->lastError = json_last_error();
      if (JSON_ERROR_NONE !== $this->lastError) {
          IdsExceptionManager::HandleException($this->getMessageFromErrorCode($this->lastError));
      }
            //TODO add logger here
        return $result;
  }