records: handle errors