29165 handle errors

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