Type Error on Account Page of New User
m-GDEV opened this issue · 1 comments
I didn't have an account for hacker news so I made one. The app displayed a Type Error on my account page. I suspected it has to do with me never having used the platform.
I upvoted a post and went back to my account page and the error was fixed.
Maybe the edge case of a user creating a new account can be handled on the account page by showing a message similar to "No account history yet, come back later"
Indeed, it takes a moment for the API to become aware of the existence of a newly registered user, so it just returns null which causes an error message to be displayed in the app. You don't even have to upvote to resolve it, just reloading the page shortly after seems to be enough. It's a bit of an annoying issue, because there's no truly objective way to differentiate between "no data available yet" and "this user does not exist, no matter how many times you ask".
Nonetheless, I think your suggestion is good, so I've added a more friendly message when an error occurs on the user page associated with the logged in user in 8c18ed1.