Show better error message when receiving an empty JSON RPC line
Fixes #1715
This commit is contained in:
parent
cf5c943127
commit
e1f4dae5c2
@ -151,6 +151,13 @@ public class JsonRpcReader {
|
||||
}
|
||||
|
||||
private JsonRpcMessage parseJsonRpcMessage(final String input) {
|
||||
if (input.trim().isEmpty()) {
|
||||
jsonRpcSender.sendResponse(JsonRpcResponse.forError(new JsonRpcResponse.Error(JsonRpcResponse.Error.PARSE_ERROR,
|
||||
"Empty input line",
|
||||
null), null));
|
||||
return null;
|
||||
}
|
||||
|
||||
final JsonNode jsonNode;
|
||||
try {
|
||||
jsonNode = objectMapper.readTree(input);
|
||||
|
Loading…
x
Reference in New Issue
Block a user