github-wrapped icon indicating copy to clipboard operation
github-wrapped copied to clipboard

is it possible to tell user about 'wrong username' issue?

Open rahgurung opened this issue 5 years ago • 3 comments

The error it currently gives will trick the user into thinking that error is from server-side, not user side. Screenshot from 2020-12-31 10-21-51

rahgurung avatar Dec 31 '20 04:12 rahgurung

Hey @gurrrung Thanks for creating this issue. The only reason that I did not pre-include an 'Invalid Username' error message was because the github api currently, does not send any error code that I could use to map a list of possible error messages.

For example : api.github.com/users/aprofilethatdoesnotexist

{
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest/reference/users#get-a-user"
}

returns this String message

The something went wrong currently, in most of the cases would still be a username error but it could also be a server side error.

I'm not saying that we shouldn't fix this issue, we definitely need to, but instead of doing it on the client side, we could first have support for better error handling and responses from server side that we can render to the client. I'm labelling this as a bug, and I'm currently busy with some other commitments, so I might be able to work on this after a few days.

In case anyone is interested in working on this issue, please comment below and me or @himanshusharma89 will assign it to you.

Hope this helps. Happy New Year : )

ishandeveloper avatar Jan 02 '21 10:01 ishandeveloper

@ishandeveloper I may be able to help with this if you like, and I also have a brief idea on how to go about it which I can share. It certainly can be an amazing feature for next year's GitHub wrapped.

APratham avatar Jan 02 '21 15:01 APratham

@ishandeveloper I have made a pull request for this issue https://github.com/ishandeveloper/github-wrapped/pull/22

faizanu94 avatar Jan 03 '21 07:01 faizanu94