Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Error Handling in the frontend #18

Open
shrinish123 opened this issue Dec 9, 2022 · 4 comments
Open

Add Error Handling in the frontend #18

shrinish123 opened this issue Dec 9, 2022 · 4 comments
Assignees

Comments

@shrinish123
Copy link
Owner

So right now whenever we make an API request , and if we might face an error the only thing done is that we console.log the error , which is bad with respect to user perspective. I would suggest to have a npm package and to show errors properly if anything goes wrong

@MaYaNkKashyap681
Copy link
Contributor

MaYaNkKashyap681 commented Dec 13, 2022

can I work on this issue?

@shrinish123
Copy link
Owner Author

Yes you can go ahead, would recommend you to use React Toastify to show the errors and also success messages if any. don't show success messages like data got loaded etc, only if there's error fetching data you can say something like Something went wrong, etc.
Also if you get success response we need to check if the status is ok or failed. Like lets say someone enters a nonexistent codeforces handle it will return a successful response as shown in the image below :

erorrhandling

So what we need to check is also if the status is ok or failed, (even after we get a successful response ) and if the status is failed add a error message where the message can be simply the same that we get from the response as shown in the above image

@shrinish123
Copy link
Owner Author

I would assign this to you, just please give me a date for your 1st PR submission, it doesn't need to complete implementation, just a small part to track your progress and that would be good.

@MaYaNkKashyap681
Copy link
Contributor

MaYaNkKashyap681 commented Dec 14, 2022

I would assign this to you, just please give me a date for your 1st PR submission, it doesn't need to complete implementation, just a small part to track your progress and that would be good.

16 Dec 2022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants