Updated models to return errors instead of throwing