diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-08-15 17:56:05 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-08-15 17:56:05 +0900 |
| commit | 17e5c98ba6d1e34c06c66017b899db60134fc9a8 (patch) | |
| tree | 2c1126991641efb53a206f9547ad34e10f821a37 /src/HttpServerBodyCommand.cc | |
| parent | 925b5cec0702f814dc89055f9ff56e1e1f599049 (diff) | |
Return 200 HTTP status code if exception was caught while executing RPC method
Previously, we returned 500 HTTP status code. I think the found in
RPC level, not in HTTP protocol, so 500 is not appropriate.
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
| -rw-r--r-- | src/HttpServerBodyCommand.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc index dea078a5..93b52c1f 100644 --- a/src/HttpServerBodyCommand.cc +++ b/src/HttpServerBodyCommand.cc @@ -115,6 +115,10 @@ void HttpServerBodyCommand::sendJsonRpcResponse httpServer_->disableKeepAlive(); int httpCode; switch(res.code) { + case 1: + // error caught while executing RpcMethod + httpCode = 200; + break; case -32600: httpCode = 400; break; |
