He did fail and survive, at Noche Triste. Retreated out of Anahuac, he was in a trouble with the few hundreds of men who had escaped with their lives from Tenochtitlan - not only had he led hundreds of Spaniards to being massacred by enemies against express orders first to not fight (only explore and trade), and then not sail at all, but he had directly killed a number of Spaniards for obeying orders - hanged two in 1519, and killed 15 of Narvaez in 1520. If the survivors of Noche Triste had insisted on going back to safety of Cuba, or even just retreating to coast and waiting for adequate reinforcements,, Cortez would have had to answer not just for disobedience but for Spanish blood shed.He disobeyed orders from the colonial governor. That did not make him a rebel against the king or country. If he had failed and somehow also survived, he might have been in trouble.