Improved error handling when getting user profile failed