Преглед на файлове

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.
Tatsuhiro Tsujikawa преди 10 години
родител
ревизия
031b86d512
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/HttpServerBodyCommand.cc

+ 1 - 1
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;