Fix error response when denying snapshot creation
If we try to create snapshot from share that is not snapshottable we expect error that it is not possible and proper description for it. Now we get some abstract message "ERROR: Unable to process the contained instructions". So, make API provide proper information about error. Change-Id: I16a2f7c80102159c30f91af7e045e73ee3df7f89 Closes-Bug: #1496408
This commit is contained in:
parent
5704fa6aa3
commit
fdca2909de
|
@ -155,7 +155,7 @@ class ShareSnapshotsController(wsgi.Controller):
|
|||
msg = _("Snapshot cannot be created from share '%s', because "
|
||||
"share back end does not support it.") % share_id
|
||||
LOG.error(msg)
|
||||
raise exc.HTTPUnprocessableEntity(msg)
|
||||
raise exc.HTTPUnprocessableEntity(explanation=msg)
|
||||
|
||||
LOG.info(_LI("Create snapshot from share %s"),
|
||||
share_id, context=context)
|
||||
|
|
Loading…
Reference in New Issue