Improve error handling in profiles/views