Mahatma Gandhi went on a five day fast and called off the Non Cooperation movement in 1922 after the Chauri-Chaura incident. His fast was completely justified because of the circumstances prevailing at that time and the ideological conflicts inflicted by the unfortunate incident.
The form of the movement that Gandhiji lead always had a vital constraint of Non-violence on it and it had zero tolerance for violence and any such intended moves whatever may be the reason behind. His fast was justified not merely as a way to show repentance about the wrongdoing by the people involved there but it was a message to the society that violence is an evil and someone has to become the picture of suffering if violence is used to achieve satyagaraha. By this fast, Gandhiji also setup a new mark of being a true leader of the masses against the colonial govt., who could take the responsibility of both, the good and the evil done by his followers.
Gandhiji understood the fact that the revolution can be brought out by a fearless mass struggle against the colonialism and a fearless mass participation against the Britishers can be achieved only if the masses do not resort to violence or raise themselves up in arms as the severe repression of such struggles was evident from the Swadeshi era. Also his ideologies were very clear on the fact that only the demand of truth can bring in the desired change and achieving truth never requires violence as a means.
Being the leader of the masses he chose the tough way to make it clear it to the masses that his leadership and the non-violence has somewhere been overshadowed by the momentary emotions of his people, who, though, were working for the same agenda, could not understand the underlying rules.
The moral conviction on Non-violence which Gandhiji brought in through his fast was completely justified in the way of establishing the clear meaning of the non-violence and a fearless struggle as part of his movement for the upcoming decades as well.