Comment 0 for bug 1353194

Revision history for this message
Gloria Gu (gloria-gu) wrote :

There are a couple of patterns for form's exception handling in volumes each of them behave differently.

for example:

1. in admin volumes create volume type

        except Exception:
            exceptions.handle(request,
                              _('Unable to create volume type.'))
            return False

When error happens, the dialog stays open, error message shows up at the upper right corner of the browser.

2. in project volumes
   except Exception:
            exceptions.handle(request, ignore=True)
            self.api_error(_("Unable to create volume."))
            return False

When error happens, the dialog stays open, error message within the form at he upper left corner in red.

3. in project volumes.
except Exception:
            redirect = reverse("horizon:project:volumes:index")
            exceptions.handle(request,
                              _('Unable to attach volume.'),
                              redirect=redirect)

when error happens , the dialog closes, error message shows up at the upper right corner of the browser.

Would like to have consistent behaviors for users. This is a wishlist.