Foster has been in superb form for Blues since his £6million summer move from Manchester United and regained his spot in the England squad.
His mistake allowed the Hammers to gain a 2-1 win at Upton Park and now Foster has to face the challenge of Sunday's derby clash with Aston Villa at St Andrew's.
However, McLeish has no doubt that Foster will put that behind him and go on to again prove his quality.
"Keepers are in that unfortunate world where a mistake normally leads to a goal," the Blues boss said.
"Edwin van der Sar did one earlier in the season against West Brom and Joe Hart one the other night against Leicester in the FA Cup. But they don't make too many errors, the great goalkeepers.
"On coaching courses, I was taught international players have one off game in 15, world class players have one off game in 25 and even more. Foster's statistics are of the world class kind."
McLeish added: "I wouldn't expect Ben to be making too many mistakes like that over the course of the next couple of years. He made mistakes at Manchester United and recovered from them. He is a fantastic keeper.
"The big man has saved us many points this season and been excellent in every game. He is human and will bounce back from that and I'm sure he will want to atone and be as good as he has been for the whole season."