I came to the Messenger of Allah ﷺ with a group of the Asharis asking him to provide us with mounts. The Messenger of Allah ﷺ said, "By Allah, I cannot give you mounts, and I have nothing to mount you upon."We waited as long as Allah willed, then some camels were brought to him, and he ordered that three fine camels with white humps be given to us. When we set off, some of us said to one another, "We came to the Messenger of Allah ﷺ asking him for mounts, and he swore that he would not give us any, then he gave us mounts. Let us go back to him."So we came to him and said, "Messenger of Allah, we came to you asking for mounts, and you swore you would not give us any, but then you gave us mounts."He replied, "By Allah, it was not I who gave you mounts, rather it was Allah who gave you mounts. By Allah, if Allah wills, I never make an oath and then see something better than it without making expiation for my oath and doing what is better," or he said, "doing what is better and making expiation for my oath."
حدثنا أحمد بن عبدة أنبأنا حماد بن زيد حدثنا غيلان بن جرير عن أبي بردة
أتيت رسول الله ﷺ في رهط من الأشعريين نستحمله فقال رسول الله ﷺ والله ما أحملكم وما عندي ما أحملكم عليه قال فلبثنا ما شاء الله ثم أتي بإبل فأمر لنا بثلاثة ذود غر الذرى فلما انطلقنا قال بعضنا لبعض أتينا رسول الله ﷺ نستحمله فحلف ألا يحملنا ثم حملنا ارجعوا بنا فأتيناه فقلنا يا رسول الله إنا أتيناك نستحملك فحلفت أن لا تحملنا ثم حملتنا فقال والله ما أنا حملتكم بل الله حملكم إني والله إن شاء الله لا أحلف على يمين فأرى خيرا منها إلا كفرت عن يميني وأتيت الذي هو خير أو قال أتيت الذي هو خير وكفرت عن يميني
Bukhari narrated it in "The Book of Oaths and Vows," in the chapter "The saying of Allah Most High, 'Allah will not call you to account for what is unintentional in your oaths'," (Hadith 6718, 6623), and Muslim narrated it in "The Book of Oaths," in the chapter "The recommendation for one who swears an oath then sees something better than it..." etc., (Hadith 1649), from the hadith of Hammad, through this same chain.