"I would not carry out a prescribed punishment on anyone and have him die from it and feel any guilt within myself, except in the case of one punished for drinking wine. If he were to die, I would pay his blood-money, because the Messenger of Allah ﷺ did not establish a fixed penalty for it."
ما كنت لأقيم حدا على أحد فيموت فأجد في نفسي، إلا صاحب الخمر فإنه لو مات وديته، وذلك أن رسول الله ﷺ لم يسنه.
Bukhari related it in the Hudud chapter (6778) and Muslim in the Hudud chapter (39:1707), both through the route of Sufyan Thawri, who said, Abu Husayn narrated to us, I heard Umayr bin Saeed Nakhai say, I heard Ali bin Abu Talib say, and then he mentioned it.His statement, "because the Messenger of Allah ﷺ did not set a fixed punishment for it," means he did not prescribe a defined hadd penalty for it. Nawawi said, "The scholars differed regarding the measure of the hadd punishment for wine drinking. Shafii, Abu Thawr, Dawud, the literalists, and others said that its hadd is forty... The judge (meaning Iyad) transmitted from the majority of the early generations and jurists, including Malik, Abu Hanifa, Uzai, Thawri, Ahmad, and Ishaq, that they said its hadd is eighty. They argued that this is what the consensus of the companions settled upon, and that the Prophet's action was not meant to fix the punishment permanently, which is why in the first narration it says, 'about forty.' The argument of Shafii and those who agree with him is that the Prophet only administered forty lashes, as is explicitly stated in the second narration. As for Umar's addition, it was a discretionary punishment, and discretionary punishment is left to the judgment of the leader, who may apply it or not depending on what serves the public interest in either applying or forgoing it." End of Nawawi's commentary (11/216). This is also the view that Sheikh Islam bin Taymiya chose.He said in Minhaj Sunnah Nabawiyyah (6/83), "The scholars of the Muslims have disputed over the amount added beyond forty up to eighty, whether it is a fixed hadd punishment that must be carried out, or a discretionary punishment that varies according to circumstances. There are two well-known positions, which are two narrations from Ahmad. The first is that it is a fixed hadd, because the minimum of the hadd punishments is eighty, which is the hadd for slander. The proponents of this view claimed that the companions reached consensus on this, and that what was transmitted about striking forty times was done with a whip that had two ends, so the forty strikes stood in place of eighty. This is the position of Abu Hanifa, Malik, and others. The second is that what exceeds forty is permissible but not an obligatory hadd, and this is the view of Shafii, which was chosen by Abu Bakr and Abu Muhammad and others. This view is stronger."He then cited as evidence for this the hadith of Ali in Sahih Muslim, and the hadith of Anas in the Sahihayn. End of quote.