You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
improved error handling by adding custom exceptions class for bauhaus (bauhaus/errors.py)
removes current use of long strings in classes
adds more informative naming of errors instead of the generic ValueError, etc
we will be able to catch errors we expect and allow unexpected ones to bubble up during testing and from use
errors always follow this pattern: (francois chollet, user experience design for APIs) 1. Catch user errors early and anticipate common mistakes.
Do user input validation as soon as possible. Actively keep track of common mistakes that people make, and either solve them by simplifying your API, adding targeted error messages for these mistakes, or having a "solutions to common issues" page in your docs. 2. Provide detailed feedback messages upon user error.
A good error message should answer: what happened, in what context? What did the software expect? How can the user fix it? They should be contextual, informative, and actionable. Every error message that transparently provides the user with the solution to their problem means one less support ticket, multiplied by how many times users run into the same issue.
The text was updated successfully, but these errors were encountered:
1. Catch user errors early and anticipate common mistakes.
Do user input validation as soon as possible. Actively keep track of common mistakes that people make, and either solve them by simplifying your API, adding targeted error messages for these mistakes, or having a "solutions to common issues" page in your docs.
2. Provide detailed feedback messages upon user error.
A good error message should answer: what happened, in what context? What did the software expect? How can the user fix it? They should be contextual, informative, and actionable. Every error message that transparently provides the user with the solution to their problem means one less support ticket, multiplied by how many times users run into the same issue.
The text was updated successfully, but these errors were encountered: