Quantcast
Channel: Squeezebox : Community : Forums
Viewing all articles
Browse latest Browse all 6235

ECONNRESET when jsonrpc request is invalid

$
0
0
I've noticed that if I ask the jsonrpc API interface for something invalid, instead of returning an error message it just abruptly closes the HTTP connection, leading to an ECONNRESET error status in nodejs (for example).

Take the query {"id":"1","method":"slim.request","params":["blah",["status","-","1","tags:A"]]}

"blah" is not a valid playerId but instead of an error message to that effect, the HTTP connection just dies.

Same (with a valid playerId) for the query ["spotty", "items", 0, 1000, "menu:spotty"] when the spotty plugin is not installed. Instead of an error message it kills the connection.

Is there any way to not crash the connection and just get a failure status code ?

Viewing all articles
Browse latest Browse all 6235

Trending Articles