You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The trace message makes no indication that an error was sent back and I could not figure out why the client/registerCapability was not even being hit. Since the messages were getting logged I knew they were not totally "lost" so I added breakpoints to the vscode-jsonrpc code and realized that VS Code did not like how I had formatted my client/registerCapability request.
returnreplyError(newResponseError<void>(ErrorCodes.InvalidParams,`Request ${requestMessage.method} defines parameters by name but received parameters by position`),requestMessage.method,startTime);
tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now()-startTime}ms`,data);
}else{
logLSPMessage('send-response',message);
}
}
It seems to me that we should check for more than just message.error && message.error.data. If message.error.code and/or message.error.message is available then we should log those in the trace too.
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "Request client/registerCapability defines parameters by name but received parameters by position"
}
}
The text was updated successfully, but these errors were encountered:
The trace message makes no indication that an error was sent back and I could not figure out why the
client/registerCapability
was not even being hit. Since the messages were getting logged I knew they were not totally "lost" so I added breakpoints to thevscode-jsonrpc
code and realized that VS Code did not like how I had formatted myclient/registerCapability
request.vscode-languageserver-node/jsonrpc/src/common/connection.ts
Lines 868 to 872 in dadd73f
We can then later clearly see that
message.error
is present and bad but the trace message in the console does not include the-32602
error.vscode-languageserver-node/jsonrpc/src/common/connection.ts
Lines 1076 to 1098 in dadd73f
It seems to me that we should check for more than just
message.error && message.error.data
. Ifmessage.error.code
and/ormessage.error.message
is available then we should log those in the trace too.The text was updated successfully, but these errors were encountered: