Hadith 1031
Sayyiduna Ibn Abbas (may Allah be pleased with them) reports that the Messenger of Allah (peace and blessings be upon him) said: "I bear witness before Allah that when an intelligent person slips, Allah elevates him even higher; then when he stumbles, Allah elevates him even higher; then if he slips again, Allah raises him up until he enters Paradise."