mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-14 19:57:50 +00:00
More cleanly handle unrecognized urls
This commit is contained in:
parent
126030b9db
commit
adf52517fd
@ -193,7 +193,13 @@ def resourcehandler(env, start_response):
|
||||
return
|
||||
else:
|
||||
start_response('200 OK', headers)
|
||||
for rsp in pluginapi.handle_path(env['PATH_INFO'], 'retrieve', cfgmgr):
|
||||
try:
|
||||
hdlr = pluginapi.handle_path(env['PATH_INFO'], 'retrieve', cfgmgr)
|
||||
except:
|
||||
start_response('404 Not found', headers)
|
||||
yield "404 - Request path not recognized"
|
||||
return
|
||||
for rsp in hdlr:
|
||||
yield json.dumps(rsp, separators=(',', ':'))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user