Yes, he was ashamed to ask the king for protection, after he had bragged to the king about God.
He said to the king, “The good hand of our God is on everyone who looks to him, but his great anger is against all who forsake him.” See Ezra 8:22-23.
To save face Ezra and his people had to wait and pray.
Then God answered Ezra’s prayer, and the praise was all God’s.
To our shame we are not ashamed to ask the world for the good things a good God would give His children.