developerFolio icon indicating copy to clipboard operation
developerFolio copied to clipboard

Add custom error messages for console

Open kartikcho opened this issue 5 years ago • 16 comments

We should add custom error messages to the console for components that depend on third party data like Twitter, Github projects and podcasts. This would clear confusion for users and visitors both on why some components are missing.

Related to #165

kartikcho avatar Jul 15 '20 10:07 kartikcho

Hi. I would like to work on this issue.

samratde avatar Oct 02 '20 16:10 samratde

Alright, assigning this to you @SamratDe !

kartikcho avatar Oct 02 '20 18:10 kartikcho

@kartikcho I am fixing the warning messages in console first, because I think if there are too many messages in the console, users will have difficult time in finding the error message for components not loading. Is it ok to do so? Most of the warning of messages are not missing key prop or misspelling prop name or classNames etc.

samratde avatar Oct 03 '20 16:10 samratde

@SamratDe they don't show up in the production deployment so custom messages would still be on top. #138 has fixed these errors but we haven't merged it in yet because of the dark mode PR. Maybe you can follow up in another PR if there are still any messages left after that PR gets in, I appreciate the help!

kartikcho avatar Oct 03 '20 16:10 kartikcho

Ok. Then I will only concentrate on adding error messages in the components.

samratde avatar Oct 03 '20 16:10 samratde

@kartikcho I have created a PR.

samratde avatar Oct 05 '20 08:10 samratde

@kartikcho I have made a PR that will close this issue, feel free to look into it and let me know if that is fine. Thanks.

MuhammadHasham23 avatar Nov 01 '20 11:11 MuhammadHasham23

@kartikcho if this issue is open then I would like to take it

Rispectech avatar Oct 01 '21 09:10 Rispectech

Sure @Rispectech! You can read the discussion above before opening a PR and ask if you have any questions.

I would suggest you to do one issue before taking more at once to keep other tasks available for other peeps too. (also easier to work this way)

kartikcho avatar Oct 01 '21 09:10 kartikcho

Thanks a lot @kartikcho . yeah u are right sorry got a bit ahead of myself

What I got from the above discussion, u need an error message on the console given the information from the external APIs is null. so sure it looks good my suggestion is we can set some default values if we don't get the information along with the error messages on the console. please tell me whether it is good enough. also, can I get your discord id or something? I would be extremely delighted if we can talk and can clear any confusion in case

Rispectech avatar Oct 01 '21 17:10 Rispectech

Yes error messages on the console would be best. Also, I think default values would defeat the purpose of adding errors since we want them to blow up in the user's face to tell them that stuff isn't working. Just make sure to throw informative errors that would help users find out what's wrong.

Also, we can keep the discussion here as a sort of documentation to refer back to or in case someone needs to pick up on this issue in the future!

kartikcho avatar Oct 01 '21 18:10 kartikcho

okay done will start working asap and what u think about displaying the error like "this missing" on the UI along with the console message

I have another doubt like in portfolio.js most of the values are hardcoded from the demo one so where are u receiving information from APIs?

Rispectech avatar Oct 01 '21 19:10 Rispectech

hey since you didn't reply today, so I complete the error message handling according to my understanding. So can I submit my PR request?

Rispectech avatar Oct 02 '21 14:10 Rispectech

Hey @Rispectech!

what u think about displaying the error like "this missing" on the UI along with the console message

I think data dependent UI components (like twitter) have a fallback message so just add console messages in your PR.

where are u receiving information from APIs?

We run a workflow script to fetch data every week, see fetch.js for the exact implementation.

So can I submit my PR

Yeah sure!

kartikcho avatar Oct 02 '21 15:10 kartikcho

Submitted the PR @kartikcho #430. Please check and review whether I need to do something else Thanks

Rispectech avatar Oct 02 '21 16:10 Rispectech

Thanks for the merge @kartikcho
Would like to work on more issues after I figure my stuff around

Rispectech avatar Oct 14 '21 12:10 Rispectech

Fixed in #430

kartikcho avatar Sep 18 '22 13:09 kartikcho