-
-
Notifications
You must be signed in to change notification settings - Fork 143
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 related end-user experience #333
base: master
Are you sure you want to change the base?
Commits on Mar 18, 2022
-
raise specific exceptions during value retrieval and processing
This makes it easier to determine what exactly went wrong and thus build better error handling in a later commit. Tests were adapted accordingly to assert that only those specific errors are raised instead of the plain ValueErrors.
Configuration menu - View commit details
-
Copy full SHA for 6427a32 - Browse repository at this point
Copy the full SHA 6427a32View commit details -
fix raised error on required BooleanValue and invalid default
Previously and ImproperlyConfigured error was always raised when an invalid default configured for the BooleanValue class. This behavior is unnecessary if the default is never used because the value is marked as environ_required. The check has thus been adapted to ignore invalid defaults in that case.
Configuration menu - View commit details
-
Copy full SHA for 0ec0a4c - Browse repository at this point
Copy the full SHA 0ec0a4cView commit details -
add custom error handling for own exceptions
This introduces a function that wraps django entry points with an error handler so that our own exception can be pretty-printed to an end-user without a large stack-trace. The defined error handler has also been applied to the existing management, wsgi, asgi and fastcgi entry point definitions.
Configuration menu - View commit details
-
Copy full SHA for 7e05c08 - Browse repository at this point
Copy the full SHA 7e05c08View commit details -
Configuration menu - View commit details
-
Copy full SHA for a33b77a - Browse repository at this point
Copy the full SHA a33b77aView commit details
Commits on Mar 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ece1521 - Browse repository at this point
Copy the full SHA ece1521View commit details
Commits on Mar 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7de2615 - Browse repository at this point
Copy the full SHA 7de2615View commit details -
This way, multiple ConfigurationErrors are caught during setup, accumulated and printed all at once
Configuration menu - View commit details
-
Copy full SHA for a3b720f - Browse repository at this point
Copy the full SHA a3b720fView commit details -
add support for adding help_text to values
Now Value classes accept a 'help_text' keyword which will get printed when a ValueRetrievalError or ValueProcessingError occurs
Configuration menu - View commit details
-
Copy full SHA for 50ac28b - Browse repository at this point
Copy the full SHA 50ac28bView commit details -
add support for adding reference links to values
Now Value classes accept a 'help_reference' keyword which will get printed when a ValueRetrievalError or ValueProcessingError occurs
Configuration menu - View commit details
-
Copy full SHA for 12ffda4 - Browse repository at this point
Copy the full SHA 12ffda4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42ab54f - Browse repository at this point
Copy the full SHA 42ab54fView commit details -
fix failing 'test_cache_url_value' test
The test failed for two reasons. One was me changing the error string in a previous commit which I have adapted the test for now. The other was that django-cache-url changed its behavior. See #332
Configuration menu - View commit details
-
Copy full SHA for a7f0606 - Browse repository at this point
Copy the full SHA a7f0606View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd1b571 - Browse repository at this point
Copy the full SHA fd1b571View commit details -
Example generators are an addition to the 'Value' classes that allow the error handler to display example values for the failed value. For example if no django secret key is found to be defined in the environment, an example (secure) value for such a secret key can now be generated on the fly and be suggested to the user
Configuration menu - View commit details
-
Copy full SHA for 5cd3a86 - Browse repository at this point
Copy the full SHA 5cd3a86View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b96d16 - Browse repository at this point
Copy the full SHA 3b96d16View commit details -
Configuration menu - View commit details
-
Copy full SHA for b21f207 - Browse repository at this point
Copy the full SHA b21f207View commit details