minor: handle errors