Form errors does not propogate to the user

Bug #1484723 reported by vishwanath jayaraman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
David Lyle

Bug Description

The error message from form error is not being displayed as part of exception.handle(request, e.message) in horizon forms.py code.

Instead a generic message "Danger: There was an error submitting the form ....." is being displayed.

Discussed this behavior with "lhcheng" in IRC, who confirmed that he saw the same behavior as well and thinks that this could be a regression.

Expected behavior: should be that the modal window remain open with the error message.

Changed in horizon:
status: New → Confirmed
importance: Undecided → High
milestone: none → liberty-3
summary: - Error message from server not being displayed in Horizon UI
+ Form errors does not propogate to the user
description: updated
Changed in horizon:
assignee: nobody → jelly (coding1314)
Changed in horizon:
assignee: jelly (coding1314) → nobody
Changed in horizon:
assignee: nobody → David Lyle (david-lyle)
status: Confirmed → In Progress
Revision history for this message
David Lyle (david-lyle) wrote :
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-3 → liberty-rc1
David Lyle (david-lyle)
tags: added: error-reporting
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/219019
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a5f5912bc346d34a5c8e1de95c0c360b8993c9c0
Submitter: Jenkins
Branch: master

commit a5f5912bc346d34a5c8e1de95c0c360b8993c9c0
Author: David Lyle <email address hidden>
Date: Mon Aug 31 12:00:57 2015 -0600

    Improve message propagation in exceptions.handle

    In horizon/exceptions.py the handle(message="blah") function only
    passes the message onto the user if the exception type is
    HorizonException or a specifically handled class. In many cases,
    including many forms, the except block calling this method is
    catching the broad Exception and not more specific errors. Once
    Exception is caught, we pass on an error message to
    horizon/exceptions.handle(). That message is ignored in several cases
    and the result is the underlying Django forms puts up a generic error
    message instead: "Danger: There was an error submitting the form..." and
    the redirect still happens.

    This change treats exceptions where a message is passed in to handle as
    recoverable as the exception has been caught and a user intended message
    attached.

    Closes-Bug: #1484723
    Change-Id: I763f7606dde5df6cf09cbaf2c8e90158e0f256e3

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-rc1 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.