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

Adding error handling with toast component! #11

Open
wants to merge 2 commits into
base: v1
Choose a base branch
from

Conversation

mdefend
Copy link

@mdefend mdefend commented Nov 15, 2024

Added error handling with toast that gives a message to the user for an invalid guest code and already taken username.

Copy link
Collaborator

@foleyash foleyash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Maggie, looks great and works as expected! If you could remove any debugging console.log()'s inside of 'src/app/page.tsx' and 'src/app/api/sessionDB/connect/route.ts' to keep the source code more concise before I pull these changes that would be great.

Also, I was thinking we could also do the following just to improve user experience even more (if you are interested):

  • When the user attempts to log in with a duplicate username, clear the username input and focus its form input element (look into the focus() method in javascript)
  • When the user attempts to join a session with an invalid guest code, clear the guest code input and focus its form input element (same as above)

@foleyash foleyash linked an issue Nov 20, 2024 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Add Error Handling to connectToSession
2 participants