| 28 | } |
| 29 | } |
| 30 | void RpcProtocolServerV2::HandleSingleRequest(const Json::Value &req, Json::Value &response) { |
| 31 | int error = this->ValidateRequest(req); |
| 32 | if (error == 0) { |
| 33 | try { |
| 34 | this->ProcessRequest(req, response); |
| 35 | } catch (const JsonRpcException &exc) { |
| 36 | this->WrapException(req, exc, response); |
| 37 | } |
| 38 | } else { |
| 39 | this->WrapError(req, error, Errors::GetErrorMessage(error), response); |
| 40 | } |
| 41 | } |
| 42 | void RpcProtocolServerV2::HandleBatchRequest(const Json::Value &req, Json::Value &response) { |
| 43 | if (req.empty()) |
| 44 | this->WrapError(Json::nullValue, Errors::ERROR_RPC_INVALID_REQUEST, Errors::GetErrorMessage(Errors::ERROR_RPC_INVALID_REQUEST), response); |
no test coverage detected