Ali bin Abu Talib reported,

When this verse was revealed, "Whether you disclose what is within yourselves or conceal it, Allah will bring you to account for it. He forgives whom He wills and punishes whom He wills" [Baqarah 2:284], it grieved us deeply.We said, "One of us speaks within himself, and he will be brought to account for it. We do not know what will be forgiven and what will not."Then this verse was revealed afterward and abrogated it, "Allah does not burden a soul beyond its capacity. It will have what it has earned, and against it will be what it has wrought" [Baqarah 2:286].

Tirmidhi 2990

Daif

حدثنا عبد بن حميد حدثنا عبيد الله بن موسى عن إسرائيل عن السدي قال

حدثني من سمع عليا يقول

لما نزلت هذه الآية {إن تبدوا ما في أنفسكم أو تخفوه يحاسبكم به الله فيغفر لمن يشاء ويعذب من يشاء} الآية أحزنتنا قال قلنا يحدث أحدنا نفسه فيحاسب به لا ندري ما يغفر منه ولا ما لا يغفر فنزلت هذه الآية بعدها فنسختها {لا يكلف الله نفسا إلا وسعها لها ما كسبت وعليها ما اكتسبت}

الترمذي 2990ضعيف
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Tafsir of the Quran
Chapter
From Surah Baqarah
Numbering
Darussalam 2990
Tirmidhi 2990