-
Notifications
You must be signed in to change notification settings - Fork 441
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
Improve error handling #9404
Labels
Milestone
Comments
ShGKme
added
0. Needs triage
enhancement
feature: frontend 🖌️
"Web UI" client
technical debt
labels
May 1, 2023
nickvergessen
modified the milestones:
v18.0.0-beta.1,
💙 Next Beta (28),
💞 Next Major (29)
Nov 2, 2023
nickvergessen
modified the milestones:
v19.0.0-beta.3,
💞 Next Beta (29),
v19.0.0-beta.4,
💙 Next Major (30)
Mar 19, 2024
How can we turn this into something executable? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use GitHub
1. Do not use
console.debug
for errors, useconsole.error
if necessaryWe also use
console.info
andconsole.warn
sometimes. Shouldn't we useconsole.debug
only for debugging related stuff?Why: Errors should be logged as errors, they have a separate place in the dev tools and display
Examples:
2. Do not catch an exception, if it is not required
Catch an exception in case:
Why: a caught exception is "missed" from further processing
Examples:
3. Don't forget to re-throw an exception if it may not be processed
Why: Otherwise it is missed
Example:
4. Think about possible exceptions and errors
5. General errors
In case an error required special processing (for example, displaying a special message) and it is some specific action error, some general app-wide error - add general catching.
For example:
window.addEventListener('error')
or app level catchwindow.addEventListener('unhandledPromiseRejection')
or app level catchSee also
The text was updated successfully, but these errors were encountered: