Ibn al-Qayyim رحمه الله said:
"Be pleased with everything that Allāh does with you. For indeed He does not prevent you except to give you. He does not test you except to protect and save you. He does not give you ill health except to cure you. He does not give you death except to give life to you.
So beware of not being pleased with Him even for the blink of an eye. Such that you fall in His eye."
[Madārij as-Sālikīn | 2/208]