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

A good way to show errors to the user #2

Open
croqaz opened this issue Jun 24, 2023 · 0 comments
Open

A good way to show errors to the user #2

croqaz opened this issue Jun 24, 2023 · 0 comments

Comments

@croqaz
Copy link
Member

croqaz commented Jun 24, 2023

The original issue is at: ShinyTrinkets/twofold.js#3

Some TwoFold tags will have errors and the user wants to see them.
The errors will be logged in the STDOUT of the command line app, but it's not cool to let the user switch to the terminal to see the errors, especially if the error happened some time ago...

The solution should be implemented at framework level - but the tags are free to implement their own error mechanism, to return the error message, instead of the success text, because the framework doesn't care.

Possible solutions:

  • write the error in the same place where the the success text would be written?
    con: the user needs to delete the ugly error text, manually, which triggers another render, which injects the error text again if the error still happens
  • write the error in a prop inside the tag. Eg: <someTag error="Ooops!" />.
  • create a new tag maybe called <err></err> and dump the most recent X errors in there?
    con: the user needs to know about this tag and remember to use it! If the tag errors for some reason, the user might think the app is not working, because it's not responding to their input.

Any other ideas 💡 ?

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

No branches or pull requests

1 participant