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

Feat: Displaying Error Message from Backend in Toast Notification #182

Closed
3 tasks done
Saksham2k3s opened this issue May 21, 2024 · 10 comments · Fixed by #284
Closed
3 tasks done

Feat: Displaying Error Message from Backend in Toast Notification #182

Saksham2k3s opened this issue May 21, 2024 · 10 comments · Fixed by #284
Labels
gssoc This label is attached to the issues related to Gssoc'24 level2

Comments

@Saksham2k3s
Copy link
Contributor

Describe the feature

Currently, the application makes an API call using Axios to create an account. On a successful response, a success toast message is shown, and the user is navigated to the home page. However, when an error occurs, a hard-coded error message (Failed To create account) is displayed in every case. I want to display the error message received from the backend in the toast notification instead of the hard-coded message.

Add ScreenShots

Hardcoded

Record

  • I agree to follow this project's Code of Conduct
  • I'm a GSSOC'24 contributor
  • I want to work on this issue
@Saksham2k3s
Copy link
Contributor Author

@VanshKing30 Please assign this issue to me under GSSOC'24

@Abhinav-Sharma06
Copy link

@VanshKing30 @Saksham2k3s please assign me this task under GSSOC 2024. I am confident that I can fix this task

@hustlerZzZ
Copy link
Collaborator

This will expose major backend errors. You have to check if any unsuccessful call doesn't leak any type of backend data!
@Saksham2k3s

@hustlerZzZ hustlerZzZ added gssoc This label is attached to the issues related to Gssoc'24 level2 labels Jun 4, 2024
@Taranpreet10451
Copy link
Contributor

Can you please assign this to me.

@hustlerZzZ
Copy link
Collaborator

Can you please assign this to me.

How are you going to proceed?

@Taranpreet10451
Copy link
Contributor

I will use a toast notification library like "react-toastify" or any other you are using to display the error message.

@hustlerZzZ
Copy link
Collaborator

I will use a toast notification library like "react-toastify" or any other you are using to display the error message.

This will expose major backend errors. You have to check if any unsuccessful call doesn't leak any type of backend data!

@Taranpreet10451
Copy link
Contributor

1.We handle different types of HTTP error status codes separately.
2.For common errors like bad requests, unauthorized access, and resource not found, we provide generic error messages to the client without exposing detailed backend information.
3. For other types of errors where there's no response from the server or if there's an unexpected error, we provide a generic error message as well.

@hustlerZzZ
Copy link
Collaborator

1.We handle different types of HTTP error status codes separately. 2.For common errors like bad requests, unauthorized access, and resource not found, we provide generic error messages to the client without exposing detailed backend information. 3. For other types of errors where there's no response from the server or if there's an unexpected error, we provide a generic error message as well.

Give time to @Saksham2k3s . If he wont then I will assign this to you

@Saksham2k3s Saksham2k3s mentioned this issue Jun 9, 2024
13 tasks
Copy link

Hello @Saksham2k3s! Your issue #182 has been closed. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc This label is attached to the issues related to Gssoc'24 level2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants