Abu Musa Ashari reported,

I came to the Prophet ﷺ with a group of the Asharis asking him to provide us with mounts. He said, "By Allah, I will not give you mounts, and I have nothing to mount you upon."We waited as long as Allah willed, and then three fine she-camels with white humps were brought to him, and he gave them to us as mounts. When we set off, we said, or some of us said, "By Allah, this will not be blessed for us. We came to the Prophet ﷺ asking him for mounts, and he swore that he would not give us any, then he gave us mounts. Let us go back to the Prophet ﷺ and remind him."So we came to him, and he said, "It was not I who gave you the mounts, rather it is Allah who gave them to you. By Allah, if Allah wills, I never swear an oath and then see something better than it without making expiation for my oath and doing what is better, or doing what is better and making expiation for my oath."

Azami 7109

Sahih

عن أبي موسى الأشعري قال

أتيت النبي ﷺ في رهط من الأشعريين أستحمله، فقال: والله لا أحملكم وما عندي ما أحملكم عليه قال: ثم لبثنا ما شاء الله أن نلبث، ثم أتي بثلاث ذود غر الذرى، فحملنا عليها، فلما انطلقنا قلنا أو قال بعضنا: والله لا يبارك لنا، أتينا النبي ﷺ نستحمله فحلف أن لا يحملنا ثم حملنا، فارجعوا بنا إلى النبي ﷺ فنذكره، فأتيناه، فقال: ما أنا حملتكم، بل الله حملكم، وإني والله- إن شاء الله- لا أحلف على يمين، فأرى غيرها خيرا منها، إلا كفرت عن يميني وأتيت الذي هو خير، أو أتيت الذي هو خير وكفرت عن يميني.

الأعظمي 7109صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Oaths and vows
Chapter
Faith
Section
Option between giving the expiation early or delaying it
Numbering
Jami al-Kamil 7109 (2nd edition)
Azami 7109