Failing to restore the durability seems very unnecessary, it should just be 100% successful as is adding an enchantment.