From 6aaee681e77a78287baa13824547eaf2ba94e787 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 11 Apr 2014 11:30:17 -0400 Subject: [PATCH] Have a user url without a valid user return a more useful message --- confluent/pluginapi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent/pluginapi.py b/confluent/pluginapi.py index 459b6061..19ad6bec 100644 --- a/confluent/pluginapi.py +++ b/confluent/pluginapi.py @@ -344,6 +344,8 @@ def handle_path(path, operation, configmanager, inputdata=None): pathcomponents, operation, inputdata) create_user(inputdata.attribs, configmanager) return iterate_collections(configmanager.list_users(), forcecollection=False) + if user not in configmanager.list_users(): + raise exc.NotFoundException("Invalid user %s" % user) if operation == 'retrieve': return show_user(user, configmanager) elif operation == 'delete':