Replaced errors with objects