Before us is Mishnah 5 in the fifth chapter of Tractate Berachos. The Mishnah deals with a mistake a person makes in his prayer, and with the significance of viewing it as a sign.
The words of the Mishnah:
"HaMispallel ve'ta'ah - siman ra lo" - a person who prayed and made a mistake in his prayer, this is a bad sign for him.
"Ve'im sheliach tzibbur hu - siman ra le'sholchav" - if the one praying is the chazzan who leads the congregation in prayer, then the mistake is a bad sign specifically for those who sent him.
The story of Rabbi Chanina ben Dosa:
The Mishnah brings a story along these lines: "Amru alav al Rabbi Chanina ben Dosa, shehayah mispallel al hacholim ve'omer: zeh chai ve'zeh meis" - they said about Rabbi Chanina ben Dosa that he would pray for the sick and say: this one will live and this one will die. Rabbi Chanina ben Dosa was a famous tzaddik who would pray on behalf of the sick, and about each one of them he would say in advance whether he would live or die.
"Amru lo: minayin atah yodei'a?" - they said to him: from where do you know?
After all, you are not a prophet. From where, then, does your knowledge of the fate of the sick come?
And his answer: "Im shegurah tefillasi be'fi - yodei'a ani shehu mekubal, ve'im lav - yodei'a ani shehu metoraf" - if my prayer flows smoothly in my mouth, I know that it is accepted, and if not, I know that it is rejected:
"Im shegurah tefillasi be'fi" - when the prayer I say on behalf of the sick person flows in my mouth without stumbling, I know that it has been accepted.
"Ve'im lav" - when the prayer does not flow smoothly in my mouth, I know that it is "metoraf", meaning that the prayer has been torn up and rejected, and the sick person is lost.
The basis of all this lies in the principle we mentioned earlier: "Shelucho shel adam kemoso" - a person's agent is considered like the person himself. For this reason, when Rabbi Chanina ben Dosa prays on behalf of the sick and his prayer does not flow smoothly in his mouth, it is as though their own prayer did not flow smoothly, and in accordance with the principle at the opening of the Mishnah, it is a bad sign for those who sent him.
In summary: the Mishnah establishes that a mistake in prayer is a bad sign for the one praying, and when it involves a sheliach tzibbur, it is a bad sign for those who sent him. On the strength of this principle, Rabbi Chanina ben Dosa was able to sense in advance the fate of every sick person for whom he prayed: the smooth flow of the prayer in his mouth is the sign that it was accepted, and its absence is the sign that it was rejected.