mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 19:45:53 +00:00
Report an error if RPC subscribe specifies no streams.
This commit is contained in:
@@ -2346,6 +2346,12 @@ Json::Value RPCHandler::doSubscribe(Json::Value jvRequest)
|
||||
}
|
||||
|
||||
if (jvRequest.isMember("streams"))
|
||||
{
|
||||
if (jvRequest["streams"].empty())
|
||||
{
|
||||
jvResult["error"] = "noStreams";
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Json::Value::iterator it = jvRequest["streams"].begin(); it != jvRequest["streams"].end(); it++)
|
||||
{
|
||||
@@ -2379,7 +2385,8 @@ Json::Value RPCHandler::doSubscribe(Json::Value jvRequest)
|
||||
}
|
||||
else
|
||||
{
|
||||
jvResult["error"] = "malformedSteam";
|
||||
jvResult["error"] = "malformedStream";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user