29165 handle errors

@ prabin, same branch as the earlier PR, just pointing it to the dev branch for this sprint.