David tried to bring the ark of God from Baale-judah to Jerusalem in 2 Samuel 6:
Ellicott did not think so:
Everyone was in a happy mood.5 David and all the house of Israel were celebrating before the LORD, with songs and lyres and harps and tambourines and castanets and cymbals.
Was David angry with God?6 When they came to the threshing floor of Nacon, Uzzah put out his hand to the ark of God and took hold of it, for the oxen stumbled. 7 And the anger of the LORD was kindled against Uzzah, and God struck him down there because of his error, and he died there beside the ark of God. 8 And David was angry because the LORD had broken out against Uzzah. And that place is called Perez-uzzahd to this day.
Ellicott did not think so:
Similarly Barnes:(8) Was displeased.—More exactly, was angry. The cause of his vexation was the Divine judgment upon Uzzah; yet it does not follow that he was angry with God, but rather was simply vexed and disturbed at this most untoward interruption of his plans.
Benson also:Displeased - Grief allied to anger seems to be intended. Compare 1 Samuel 15:11 note.
Keil and Delitzsch:2 Samuel 6:8. David was displeased — Or rather, grieved, both for the sin, and for God’s heavy judgment; whereby their hopes were dashed, and their joys interrupted.
I don't know of any commentaries saying David was angry at God.The burning of David's anger was not directed against God, but referred to the calamity which had befallen Uzzah, or speaking more correctly, to the cause of this calamity, which David attributed to himself or to his undertaking. As he had not only resolved upon the removal of the ark, but had also planned the way in which it should be taken to Jerusalem, he could not trace the occasion of Uzzah's death to any other cause than his own plans. He was therefore angry that such misfortune had attended his undertaking.
9 And David was afraid of the LORD that day, and he said, “How can the ark of the LORD come to me?”