Book 08, Chapter 004, Verse 009. or 8.4.9.
yadrcchayA tatra mahA-yaSA munihi
samAgamat Sishya-gaNaih pariSritah
ta vIkṣya tUshNIm akria ArhaNAdikam
rahasy upAsInam riShIs cukOpa ha.
Book 08, Chapter 004, Verse 010. or 8.4.10.
tasmA imam SApam adAd asAdhur
ayam durAtmAkrita- buddhir adya
viprAvamantA viSatAm tamisram
yathA gajah stabdha-matih sa eva
Context and gist:
This is a very famous and popular story of "gajEndra mOksham (Liberation of the King of Elephants)". indradyumna was a human king. agastya was a very celebrated sage.
Very celebrated Sage agastya, accompanied by his entourage of disciples, arrived when king indradyumna was in a state of ecstasy, immersed in meditation (of Supreme Soul), in a secluded spot. indradyumna could not receive the sage properly with customary befitting etiquette, protocol and reception.
Angry agastya, hence, cursed indradyumna to be born as an elephant possessing blunt intelligence (stabdha-matih) amidst darkness of ignorance (tamisram).
Feelings of ybrao a donkey, without malice to anybody
Sages, accordance to scriptures, should possess great endurance and tolerance. Here agastya was too irritable and volatile. He was too hasty in cursing indradyumna.
agastya should have recognised that indradyumna was not inebriated or engaged in some other sensuous activity. He was engaged in contemplating on God.
agastya forgot that he had gone to indradyumna's place, uninvited and without advance intimation. Had agastya informed indradyumna in advance, he would have probably received agastya with greater honors and might have even arranged a feast, followed by a joint meditation campaign.
One can always say that agastya wanted to help indradyumna by cursing him to be an elephant, so that indradyumna after being caught by the cruel crocodile, would pray Lord vishNu with greater intensity and attain him very fast, which would have otherwise taken several births and rebirths, and several ages.
We can also compare the curse given by Sage agastya to king indradyumna, to the curse given by Sage dUrvAsa to king ambarIsha. Lord VishNu immediately rescued his devotee ambarIsha by sending his discus , without the need of ambarIsha waiting for ages. ambarIsha had no need to pray vishNu in a pathetic condition and tone. It is not clear, why vishNu didn't send his discus to chase agastya. Somehow, Lord vishNu ignored agastya, without punishing him for unreasonably, haughtily cursing indradyumna.