Return 404 rather than ValueError
The get_service function returns ValueError when the service response is neither cinder nor glance. Switch this over to abort 404. Closes-Bug: #1700144 Change-Id: If2cf585dd555eab4771a27fe6f272842a3d498fe
This commit is contained in:
parent
cc013105f0
commit
199dbbaea8
|
@ -46,7 +46,7 @@ def get_service(a):
|
|||
if service in ['image', 'volume']:
|
||||
return service
|
||||
else:
|
||||
raise ValueError
|
||||
abort(404)
|
||||
|
||||
|
||||
def get_details(method, path, headers):
|
||||
|
|
Loading…
Reference in New Issue