throw error on connection if any