private function streamView($response)
    {
        if (Response::isError($response) &&
            !$response->getBody() instanceof ViewStream
        ) {
            $response = $this->setErrorView($response);
            return $response;
        }
        return $response;
    }