Displaying of API exception messages in the UI

Registered by Ana Krivokapić

There have been many occurrences when (especially new) contributors have made patches which propagate messages of exceptions thrown by various OpenStack APIs to users in the UI. These changes have been made in attempt to further clarify a not entirely clear UI error message. We need to improve Horizon documentation at http://docs.openstack.org/developer/horizon/, and explain why displaying these messages in the UI is not a good way to solve this problem.

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Medium
Drafter:
Ana Krivokapić
Direction:
Approved
Assignee:
Cindy Lu
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon ocata-1
Started by
Cindy Lu
Completed by
Cindy Lu

Related branches

Sprints

Whiteboard

***** 10/28/2016 [clu_] The topic of error messages always seems to come up. I will update the documentations with some context.

[david-lyle 2014.08.26] Moving milestone to Kilo

[tsufiev 2014.12.22] Ana, are you talking about the patches like this one https://review.openstack.org/#/c/131704/ where the final message shown in UI is dispatched on the exception code? Or something else? I'm asking because handling exception in such way seems totally messy to me and I'd like to propose a blueprint to fix that.

[akrivoka 2015.01.05] Timur, yes this is about the instances when the exception message is propagated to the UI. This poses several problems, including security and translation issues. We have discussed this many times in the Horizon community, and IIRC the consensus was that the ideal solution is to make sure that messages received from service APIs are clean and translated, so that we can simply just display them in the UI. So the solution is on the APIs side, not the Horizon side, which obviously makes it a lot harder to implement. This specific bp is just about summarizing this info and putting it somewhere in our docs, so that we can point the developers to that when they propose a patch like the one you've linked to.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.