Handle responses other than ok by closing the connection.