Surah Al-Ahzaab

33:15

وَلَقَدْ كَانُوا۟ عَٰهَدُوا۟ ٱللَّهَ مِن قَبْلُ لَا يُوَلُّونَ ٱلْأَدْبَٰرَ ۚ وَكَانَ عَهْدُ ٱللَّهِ مَسْـُٔولًۭا

And they had already promised Allah before not to turn their backs and flee. And ever is the promise to Allah [that about which one will be] questioned.

Tafsir 33:15

And these hypocrites had promised Allah after they fled from fighting on the occasion of Uhud that if Allah were to make them witness another battle, they will definitely fight their enemy and not flee out of fear. However, they broke their promise. And the servant is responsible for the promise he made to Allah and he will soon be questioned about it.