mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Log a debug message when dropping json rpc response for request without id
This commit is contained in:
parent
ef2a013db3
commit
19f7b5d78d
1 changed files with 7 additions and 0 deletions
|
@ -70,10 +70,17 @@ public class JsonRpcReader {
|
||||||
final var result = requestHandler.apply(request.getMethod(), request.getParams());
|
final var result = requestHandler.apply(request.getMethod(), request.getParams());
|
||||||
if (request.getId() != null) {
|
if (request.getId() != null) {
|
||||||
return JsonRpcResponse.forSuccess(result, request.getId());
|
return JsonRpcResponse.forSuccess(result, request.getId());
|
||||||
|
} else {
|
||||||
|
logger.debug("Command '{}' succeeded but client didn't specify an id, dropping response",
|
||||||
|
request.getMethod());
|
||||||
}
|
}
|
||||||
} catch (JsonRpcException e) {
|
} catch (JsonRpcException e) {
|
||||||
if (request.getId() != null) {
|
if (request.getId() != null) {
|
||||||
return JsonRpcResponse.forError(e.getError(), request.getId());
|
return JsonRpcResponse.forError(e.getError(), request.getId());
|
||||||
|
} else {
|
||||||
|
logger.debug("Command '{}' failed but client didn't specify an id, dropping error: {}",
|
||||||
|
request.getMethod(),
|
||||||
|
e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue