diff --git a/i2pcontrol/I2PControl.cpp b/i2pcontrol/I2PControl.cpp index 8e680307..20724032 100644 --- a/i2pcontrol/I2PControl.cpp +++ b/i2pcontrol/I2PControl.cpp @@ -39,7 +39,7 @@ std::string I2PControlSession::Response::toJsonString() const } oss << "},\"jsonrpc\":\"" << version << '"'; if(error != ErrorCode::None) - oss << ",\"error\":{\"code\":" << static_cast(error) + oss << ",\"error\":{\"code\":" << -static_cast(error) << ",\"message\":\"" << getErrorMsg() << "\"" << "}"; oss << "}"; return oss.str();