[API]: Fix issue where an invalid LBID would give a 500 error
Change-Id: Ibf3df2a958e661c27e44e3b0cfef4216e33ccc44
This commit is contained in:
@@ -510,6 +510,11 @@ class LoadBalancersController(RestController):
|
|||||||
|
|
||||||
Raises: 404
|
Raises: 404
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
|
lbid = int(lbid)
|
||||||
|
except ValueError:
|
||||||
|
raise abort(404)
|
||||||
|
|
||||||
if len(remainder):
|
if len(remainder):
|
||||||
if remainder[0] == 'nodes':
|
if remainder[0] == 'nodes':
|
||||||
return NodesController(lbid), remainder[1:]
|
return NodesController(lbid), remainder[1:]
|
||||||
|
|||||||
Reference in New Issue
Block a user