LSN interview question

Write code how do you handle errors.