Document exception handling
Many new contributors print the errors returned by the API directly to the UI. However, this is dangerous because errors can be very technical/ reveal sensitive data/ and are not translatable. We need to document this for reference. Change-Id: Ic0ad138b69995d842af0eeeeab73fa3ebec795c9 Implements: bp document-exception-propogation
This commit is contained in:
parent
8c17f76e96
commit
55bd8901c4
|
@ -485,6 +485,17 @@ Again, readability is paramount; however be conscientious of how the browser
|
|||
will handle whitespace when rendering the output. Two spaces is the preferred
|
||||
indentation style to match all front-end code.
|
||||
|
||||
Exception Handling
|
||||
------------------
|
||||
|
||||
Avoid propogating direct exception messages thrown by OpenStack APIs to the UI.
|
||||
It is a precaution against giving obscure or possibly sensitive data to a user.
|
||||
These error messages from the API are also not translatable. Until there is a
|
||||
standard error handling framework implemented by the services which presents
|
||||
clean and translated messages, horizon catches all the exceptions thrown by the
|
||||
API and normalizes them in :func:`horizon.exceptions.handle`.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue