bool SubscribeToCertificateUpdatesStreamHandler::OnStreamError()

in greengrass_ipc/source/GreengrassCoreIpcModel.cpp [7997:8027]


        bool SubscribeToCertificateUpdatesStreamHandler::OnStreamError(
            Aws::Crt::ScopedResource<OperationError> operationError,
            RpcError rpcError)
        {
            bool streamShouldTerminate = false;
            if (rpcError.baseStatus != EVENT_STREAM_RPC_SUCCESS)
            {
                streamShouldTerminate = OnStreamError(rpcError);
            }
            if (operationError != nullptr &&
                operationError->GetModelName() == Aws::Crt::String("aws.greengrass#ServiceError") &&
                !streamShouldTerminate)
            {
                streamShouldTerminate = OnStreamError(static_cast<ServiceError *>(operationError.get()));
            }
            if (operationError != nullptr &&
                operationError->GetModelName() == Aws::Crt::String("aws.greengrass#UnauthorizedError") &&
                !streamShouldTerminate)
            {
                streamShouldTerminate = OnStreamError(static_cast<UnauthorizedError *>(operationError.get()));
            }
            if (operationError != nullptr &&
                operationError->GetModelName() == Aws::Crt::String("aws.greengrass#InvalidArgumentsError") &&
                !streamShouldTerminate)
            {
                streamShouldTerminate = OnStreamError(static_cast<InvalidArgumentsError *>(operationError.get()));
            }
            if (operationError != nullptr && !streamShouldTerminate)
                streamShouldTerminate = OnStreamError(operationError.get());
            return streamShouldTerminate;
        }