Raise correct error when api.tacker.get_vnf fail
When api.tacker.get_vnf fail with not found error, raise a correct error for handler(i.e. django.http.Http404) Change-Id: Ib3b251a59e4306a73f02e56404ee64cea5133471 Related-Bug: #1554663
This commit is contained in:
parent
cec7bacc13
commit
f51ec2cf36
|
@ -23,6 +23,7 @@ from horizon import tables
|
|||
|
||||
from openstack_dashboard import policy
|
||||
from tacker_horizon.openstack_dashboard import api
|
||||
from tackerclient.common.exceptions import NotFound
|
||||
|
||||
|
||||
class VNFManagerItem(object):
|
||||
|
@ -130,8 +131,8 @@ class VNFUpdateRow(tables.Row):
|
|||
item.status = vnf['status']
|
||||
item.stack_status = vnf['status']
|
||||
return item
|
||||
except Http404:
|
||||
raise
|
||||
except (Http404, NotFound):
|
||||
raise Http404
|
||||
except Exception as e:
|
||||
messages.error(request, e)
|
||||
raise
|
||||
|
|
Loading…
Reference in New Issue