Adding an exception when connection is missing