add error handling for view renders