catch the error event when can't establish a connection to the swamp cli