direct-io.hg

changeset 11442:7d4def53936c

[XEND] Return an Internal Server Error via the Xend HTTP server.

This allows domain creation failures can be detected when done via HTTP.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
author atse@norwich.uk.xensource.com
date Tue Sep 12 16:33:33 2006 +0100 (2006-09-12)
parents 956e9aaf88c9
children 3e4fa8b5b245
files tools/python/xen/web/SrvBase.py
line diff
     1.1 --- a/tools/python/xen/web/SrvBase.py	Tue Sep 12 11:09:22 2006 +0100
     1.2 +++ b/tools/python/xen/web/SrvBase.py	Tue Sep 12 16:33:33 2006 +0100
     1.3 @@ -84,6 +84,7 @@ class SrvBase(resource.Resource):
     1.4              try:
     1.5                  return op_method(op, req)
     1.6              except Exception, exn:
     1.7 +                req.setResponseCode(http.INTERNAL_SERVER_ERROR, "Request failed: " + op)
     1.8                  log.exception("Request %s failed.", op)
     1.9                  if req.useSxp():
    1.10                      return ['xend.err', str(exn)]