adding errors property to objects