Answered by Ustadh Tabraze Azam
Question: I understand that a Muslim is tried either because of something wrong he is doing (or has done) or because Allah is trying to raise his status. So, I believe, the first case would necessitate tawbah and the second case, patience. So if one is undergoing hardship, how can you tell which of the two scenarios applies to him/her?
Answer: Wa alaikum assalam wa rahmatullahi wa barakatuh,
I pray that you are well, insha’Allah.
Trials occur for one of three reasons: Due to sins: the sign of which is impatience, restlessness and complaining;  As an expiation for sins: the sign of which is patience and obedience being easy on the body;  To raise one’s rank: the sign of which is calm and contentment along with obedience being easy for the body and heart. [Nahlawi, al-Durar al-Mubaha]
In any case, one should realize the hidden blessing of the trial. Renew one’s repentance, resolve, and turning to Allah, and seek out the people of knowledge and righteousness striving to be counted amongst them. The Messenger of Allah (Allah bless him and give him peace) said, “How amazing is the believer’s affair! Allah decrees nothing for the servant except that it is good for him.” [Musnad Ahmad]
And Allah alone gives success.
Checked & Approved by Faraz Rabbani