handle client exit through raise/rescue