diff --git a/lib/http/__init__.py b/lib/http/__init__.py index dab1327f3ddc528f638235609d28b15fd715c596..769e21ebc3c235d3f2ef53b2a065e87214b8cef9 100644 --- a/lib/http/__init__.py +++ b/lib/http/__init__.py @@ -231,7 +231,7 @@ class HttpPreconditionFailed(HttpException): code = 412 -class HttpInternalError(HttpException): +class HttpInternalServerError(HttpException): """500 Internal Server Error RFC2616, 10.5.1: The server encountered an unexpected condition which diff --git a/lib/http/server.py b/lib/http/server.py index a671591f6057ddaa8082c04f9878798cbcd8f276..0a75052dba2e26b890f7f857ee111c35c9508323 100644 --- a/lib/http/server.py +++ b/lib/http/server.py @@ -316,10 +316,10 @@ class _HttpServerRequestExecutor(object): raise except Exception, err: logging.exception("Caught exception") - raise http.HttpInternalError(message=str(err)) + raise http.HttpInternalServerError(message=str(err)) except: logging.exception("Unknown exception") - raise http.HttpInternalError(message="Unknown error") + raise http.HttpInternalServerError(message="Unknown error") # TODO: Content-type encoder = http.HttpJsonConverter() diff --git a/lib/rapi/rlib1.py b/lib/rapi/rlib1.py index f4ef9a9c5fcbe462f2395edbeeb673d2e6208b8d..afc0e6a523e693e474a6490e879cbbd2ad67854c 100644 --- a/lib/rapi/rlib1.py +++ b/lib/rapi/rlib1.py @@ -232,6 +232,6 @@ class R_os(baserlib.R_Generic): diagnose_data = ganeti.cli.SubmitOpCode(op) if not isinstance(diagnose_data, list): - raise http.HttpInternalError(message="Can't get OS list") + raise http.HttpInternalServerError(message="Can't get OS list") return [row[0] for row in diagnose_data if row[1]]