summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-05-31 13:13:46 +0000
committerJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-05-31 13:13:46 +0000
commita390798d4e5956e94060a9c45a1f7be2bdb9ccbd (patch)
tree77537366d3a0d24b9d23360083f5195e931653ae
parent0f2142b14adc442840c79a48add0dab78acf7c93 (diff)
downloadnova-a390798d4e5956e94060a9c45a1f7be2bdb9ccbd.tar.gz
nova-a390798d4e5956e94060a9c45a1f7be2bdb9ccbd.tar.xz
nova-a390798d4e5956e94060a9c45a1f7be2bdb9ccbd.zip
Make sure an exception is logged when config file isn't found
Fixes bug 1006457 Since exception.ConfigNotFound was derived from exception.NotFound, it would result in a silent 404 error being returned to the client instead of logging a useful error message that a necessary config file was missing and returning a 500 error. Change-Id: I3abefae8d41be4013501ba1731fa49e3c93bde1a
-rw-r--r--nova/exception.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/nova/exception.py b/nova/exception.py
index 1e1818e7d..3f3988d2d 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -424,10 +424,6 @@ class NotFound(NovaException):
code = 404
-class FlagNotSet(NotFound):
- message = _("Required flag %(flag)s not set.")
-
-
class VolumeNotFound(NotFound):
message = _("Volume %(volume_id)s could not be found.")
@@ -941,11 +937,13 @@ class MalformedRequestBody(NovaException):
message = _("Malformed message body: %(reason)s")
-class ConfigNotFound(NotFound):
+# NOTE(johannes): NotFound should only be used when a 404 error is
+# appropriate to be returned
+class ConfigNotFound(NovaException):
message = _("Could not find config at %(path)s")
-class PasteAppNotFound(NotFound):
+class PasteAppNotFound(NovaException):
message = _("Could not load paste app '%(name)s' from %(path)s")