Closed
Description
Discussed in #957
Originally posted by garrylie August 6, 2024
I got this error each time I send a command:
[AJAX] Invalid JSON-RPC - Server responded:
{"id":"1","result":"pong","jsonrpc":"2.0"}
What is wrong with my response?
content-type is application/json.
The error is that "id" field is a string, not a number.
This is the function that check the type:
function validJSONRPC(response) {
return typeof response.id === 'number' &&
(typeof response.result !== 'undefined' ||
typeof response.error !== 'undefined');
}
Metadata
Metadata
Assignees
Labels
No labels
Activity