Repenting before death
Abdullah bin Umar bin Al-Khattab (radi Allahu anhum) reported that the Messenger of Allah (sal Allahu alaihi wa sallam) said, “Allah accepts a slave’s repentance as long as the latter is not on his death bed (that is, before the soul of the dying person reaches the throat).”
[At-Tirmidhi, who categorised it as Hadith Hasan]
The word Ghargharah means the stage when the soul is about to leave the body and reaches the throat. In other words, the time when one suffers the agony of death.
Hadith Hasan means that the Hadith has the authenticity of which is connected without any technical defect. Their narrators, however, are next to those of Hadith Sahih. In the opinion of Muhaddithin (Hadith scholars), Hadith Hasan is also reliable as Hadith Sahih.
And Allah Knows Best!