private function buildRequestError(PlugException $e)
    {
        $data    = $e->getResponse() ? json_decode($e->getResponse()->getBody(), true) : ['error' => $e->getMessage()];
        $message = isset($data['error']) ? $data['error'] : 'Server Error';
        $status  = $e->getResponse() ? $e->getResponse()->getStatusCode() : 500;

        return new CommunicationException(sprintf('%s : %s', $status, $message));
    }