Don't raise 404 on missing queues

In versions 1.1 and v2 queues are treated as lazy resources. Therefore,
the API should not be raising 404 errors when listing messages for non
existing queues.

Change-Id: I58480ebe71e85c2d5460526504e71184f1a5e003
This commit is contained in:
Flavio Percoco 2015-09-10 17:19:16 +02:00
parent ef34e223e3
commit 341df87c41
2 changed files with 4 additions and 4 deletions

View File

@ -111,9 +111,9 @@ class CollectionResource(object):
LOG.debug(ex)
raise wsgi_errors.HTTPBadRequestAPI(six.text_type(ex))
except storage_errors.DoesNotExist as ex:
except storage_errors.QueueDoesNotExist as ex:
LOG.debug(ex)
raise falcon.HTTPNotFound()
messages = None
except Exception as ex:
LOG.exception(ex)

View File

@ -111,9 +111,9 @@ class CollectionResource(object):
LOG.debug(ex)
raise wsgi_errors.HTTPBadRequestAPI(six.text_type(ex))
except storage_errors.DoesNotExist as ex:
except storage_errors.QueueDoesNotExist as ex:
LOG.debug(ex)
raise falcon.HTTPNotFound()
messages = None
except Exception as ex:
LOG.exception(ex)