1 Chronicles 17:2-4 KJV
Then Nathan said unto David, Do all that is in thine heart; for God is with thee.
And it came to pass the same night, that the word of God came to Nathan, saying,
Go and tell David my servant, Thus saith the LORD, Thou shalt not build me an house to dwell in:
Nathan's position before the king must have been a powerful one. Few people have the spiritual ear of a leader in the manner Nathan did of David; and the prophet's office was a unique one in that day anyway. The prophet's word was taken as truth. If a prophet ever said something that did not come to pass he was to be considered a false prophet and stoned.
So when David communed with him about the Ark of the Covenant and it's place under curtains, it could certainly not have been taken as one friend speaking to another when Nathan told him to do what was in his heart and that God was with him in it. But Nathan barely got the words out when God came to him (that same night) and said His plan was not the same at all.
Nathan must have been humbled to return to the king and tell him what God had really said. The first time Nathan spoke from his own heart. He spoke as a man whose concern was for the things of God and whose reason believed David's desire was sound.
God is so much greater than us that we cannot afford to operate on spiritual assumptions. God's Word must be searched and we must labor that our responses and actions would be pleasing to Him.
May God keep us humble and ever searching what is true and not just what seems right.