fix: handle exceptin better if connect() failed