From 031b86d512e26f6aa1b434f548bb54be50a6aae7 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 21 Sep 2015 22:58:31 +0900 Subject: [PATCH] Return 400 status code if there is an error in RPC level 200 status code means success. Since the request did not succeed, we should avoid it. --- src/HttpServerBodyCommand.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc index 93b52c1f..2f7bc7da 100644 --- a/src/HttpServerBodyCommand.cc +++ b/src/HttpServerBodyCommand.cc @@ -117,7 +117,7 @@ void HttpServerBodyCommand::sendJsonRpcResponse switch(res.code) { case 1: // error caught while executing RpcMethod - httpCode = 200; + httpCode = 400; break; case -32600: httpCode = 400;