Commit 79589f25 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Rename http.HttpInternalError to HttpInternalServerError

All other exceptions are named after the error name in RFC2616 (HTTP/1.1).

Reviewed-by: amishchenko
parent b3660886
......@@ -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
......@@ -316,10 +316,10 @@ class _HttpServerRequestExecutor(object):
except Exception, err:
logging.exception("Caught exception")
raise http.HttpInternalError(message=str(err))
raise http.HttpInternalServerError(message=str(err))
logging.exception("Unknown exception")
raise http.HttpInternalError(message="Unknown error")
raise http.HttpInternalServerError(message="Unknown error")
# TODO: Content-type
encoder = http.HttpJsonConverter()
......@@ -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]]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment