public function performRequest($method, $uri, $params = null, $body = null)
    {
        try {
            // serialize(json) body if it's not already a string
            if ($body !== null) {
                $body = $this->getSerializer()->serialize($body);
            }

            return $this->processRequest(
                $method,
                $uri,
                $params,
                $body
            );
        } catch (ClientErrorResponseException $exception) {
            throw $exception;
        } catch (ServerErrorResponseException $exception) {
            throw $exception;
        }
    }