mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[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>
This commit is contained in:
1 parent
f1b7d71605
commit
82f6d80e3a
1 file changed
+1
@@ -84,6 +84,7 @@ class SrvBase(resource.Resource):
|
||||
try:
|
||||
return op_method(op, req)
|
||||
except Exception, exn:
|
||||
req.setResponseCode(http.INTERNAL_SERVER_ERROR, "Request failed: " + op)
|
||||
log.exception("Request %s failed.", op)
|
||||
if req.useSxp():
|
||||
return ['xend.err', str(exn)]
|
||||
|
||||