X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=osm_nbi%2Fadmin_topics.py;h=df31e902706ff54915e74287cf2d252b9540e4b7;hb=50c8e6ea78990816eb34e748e765c7b334657c5a;hp=9ecb61bde2acba2abb48d611b2beef1fdf3c965e;hpb=f5f2e3f9cecc38647a437af7812323a1da7d3f60;p=osm%2FNBI.git diff --git a/osm_nbi/admin_topics.py b/osm_nbi/admin_topics.py index 9ecb61b..df31e90 100644 --- a/osm_nbi/admin_topics.py +++ b/osm_nbi/admin_topics.py @@ -655,7 +655,7 @@ class UserTopicAuth(UserTopic): Get complete information on an topic :param session: contains "username", "admin", "force", "public", "project_id", "set_project" - :param _id: server internal id + :param _id: server internal id or username :return: dictionary, raise exception if not found. """ # Allow _id to be a name or uuid @@ -665,9 +665,9 @@ class UserTopicAuth(UserTopic): if len(users) == 1: return users[0] elif len(users) > 1: - raise EngineException("Too many users found", HTTPStatus.CONFLICT) + raise EngineException("Too many users found for '{}'".format(_id), HTTPStatus.CONFLICT) else: - raise EngineException("User not found", HTTPStatus.NOT_FOUND) + raise EngineException("User '{}' not found".format(_id), HTTPStatus.NOT_FOUND) def edit(self, session, _id, indata=None, kwargs=None, content=None): """