Cherry pick error callback fix