From 82fe5b958e837ed5cd105cf22a68a48820add5ea Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Thu, 9 Aug 2012 15:32:43 +0200 Subject: [PATCH] fix error responses to match spec --- apps/oai/handlers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/oai/handlers.py b/apps/oai/handlers.py index e203d0b71..4c55eb68f 100644 --- a/apps/oai/handlers.py +++ b/apps/oai/handlers.py @@ -146,7 +146,7 @@ Returns (header, metadata, about) for given record. deleted_book = Deleted.objects.get(content_type=book_type, slug=slug) except: - raise error.NoRecordsMatchError() + raise error.IdDoesNotExistError() return self.record_for_book(deleted_book) def listIdentifiers(self, **kw): @@ -175,12 +175,13 @@ returns result, token server.NS_OAIDC)] def listSets(self, **kw): - tags = [] + raise error.NoSetHierarchyError() + # tags = [] # for category in Catalogue.TAG_CATEGORIES: # for tag in Tag.objects.filter(category=category): # tags.append(("%s:%s" % (tag.category, tag.slug), # tag.name, # tag.description)) - return tags, None + # return tags, None -- 2.20.1