(1) CHAPTER. The Statement of Allah: “Allah will not punish you for what is unintentional in your oaths, but He will punish you for your deliberate oaths; for its expiation (a deliberate oath) feed ten poor persons, on a scale of the average of that with which you feed your own families; or clothe them; or manumit a slave. But whosoever cannot afford (that), then he should fast for three days. That is the expiation for the oath when you have sworn. And protect your oaths (i.e., do not swear much). Thus Allah make clear to you His Ayat (proofs, evidances, verses, lessons, signs, revelations, etc.) that you may be grateful. (V.5:89)
Narrated `Abdur-Rahman bin Samura: The Prophet said, O `Abdur-Rahman bin Samura! Do not seek to be a ruler, because if you are given authority for it, then you will be held responsible for it, but if you are given it without asking for it, then you will be helped in it (by Allah): and whenever you take an oath to do something and later you find that something else is better than the first, then do the better one and make expiation for your oath.
Authentic