When prodding around the JSON RPC API manually with curl, no clear error message is returned when the job_status method is called with a missing test_id parameter.
$ curl -s -H "Content-Type: application/json" -X POST \
-d '{"jsonrpc": "2.0", "method": "test_progress", "params": {}, "id": "'`uuidgen`'"}' \
http://localhost:5000/ | jq
{
"result": null,
"jsonrpc": "2.0",
"id": "9c644caa-0a3c-45d9-8d25-e863c7cb4c44"
}
When a correct test/job ID is supplied, the behavior is correct:
$ curl -s -H "Content-Type: application/json" -X POST \
-d '{"jsonrpc": "2.0", "method": "job_status", "params": {"test_id": "de1ccfc8308d05ec"}, "id": "'`uuidgen`'"}' \
http://localhost:5000/ | jq
{
"result": {
"progress": 100
},
"id": "e83160e1-db7f-4027-9b43-7bb4024f1309",
"jsonrpc": "2.0"
}
But no error is returned if the test_id parameter does not reference a valid job/test:
$ curl -s -H "Content-Type: application/json" -X POST \
-d '{"jsonrpc": "2.0", "method": "job_status", "params": {"test_id": "definitelynonexistent"}, "id": "'`uuidgen`'"}' \
http://localhost:5000/ | jq
{
"result": {
"progress": null
},
"jsonrpc": "2.0",
"id": "77ae1f00-3e7e-4a9e-9541-4da69aff9505"
}
When prodding around the JSON RPC API manually with
curl, no clear error message is returned when thejob_statusmethod is called with a missingtest_idparameter.{ "result": null, "jsonrpc": "2.0", "id": "9c644caa-0a3c-45d9-8d25-e863c7cb4c44" }When a correct test/job ID is supplied, the behavior is correct:
{ "result": { "progress": 100 }, "id": "e83160e1-db7f-4027-9b43-7bb4024f1309", "jsonrpc": "2.0" }But no error is returned if the
test_idparameter does not reference a valid job/test:{ "result": { "progress": null }, "jsonrpc": "2.0", "id": "77ae1f00-3e7e-4a9e-9541-4da69aff9505" }