modify Error Handlings on connection