Raise an error when there is no connection for gui