add logic for connection refuse exception