update failed function logic