Fix error handling in ResultSet#getRecords