ThatConference / that-website

THAT Conference
https://www.thatconference.com
MIT License
32 stars 22 forks source link

Create Profile - No error shown when https://api.that.tech/ unreachable #446

Open wags1999 opened 4 years ago

wags1999 commented 4 years ago

My enterprise allows access to https://www.thatconference.com/, but blocks https://api.that.tech/.

I attempted several times to create my profile, but no errors ever showed on screen.

Would be nice if there were some visible error when https://api.that.tech/ is unreachable.

theClarkSell commented 4 years ago

@wags1999 do you think it's because of the .tech domain? Can you help me understand what you were getting\seeing? Were you at least taken to the error page?

wags1999 commented 4 years ago

@csell5, it may have been blocked because it's a relatively new domain. My enterprise has now unblocked it, so I'm able to get my profile setup now.

But I wasn't getting any error on the UI, nor redirected to an error page. It let me fill out my profile, but then just didn't do anything when I clicked on the final Create button. Only by looking in the F12 developer tools could I tell what the problem was.

visshaljagtap commented 4 years ago

@wags1999 have you fill all the required fields specially Bio details on last page?

theClarkSell commented 4 years ago

After looking deeper this session made two api calls to api.that.tech to check and see if the profile slug was already taken. The network call failed with:

TypeError: Failed to fetch

and it doesn't appear to have returned an http status code. After looking further https://github.com/ThatConference/that-website/blob/master/components/Member/Profile/ContactInfo.js#L52 isn't handling the error state from LazyQuery. https://www.apollographql.com/docs/react/api/react-hooks/#uselazyquery

At a minimum we should react to that and throw if we can't recover.

theClarkSell commented 4 years ago

I also believe there are other places in the website that are also missing dealing with the error argument from apollo client.