Subsonic API: differences in error reporting.
Examples of differences in result returned to client apps:
Example 1 getAlbum.view call missing id parameter: Funkwhale 0.17 send subsonic status "ok" when returning errors: GET https://demo.funkwhale.audio/rest/getAlbum.view?v=1.9.0&u=demo&p=demo&f=json
{
"subsonic-response": {
**"status": "ok",**
"version": "1.16.0",
"type": "funkwhale",
"funkwhaleVersion": "0.17",
"error": {
"code": 10,
"message": "required parameter 'id' not present"
}
}
}
Subsonic on the other hand returns "failed": GET http://demo.subsonic.org/rest/getAlbum.view?v=1.9.0&u=guest1&p=guest&f=json&c=test
{
"subsonic-response": {
**"status": "failed",**
"version": "1.16.1",
"error": {
"code": 10,
"message": "Required int parameter 'id' is not present"
}
}
}
Example 2 Missing authentication parameter ("u"): Funkwhale 0.17 GET https://demo.funkwhale.audio/rest/getAlbum.view?v=1.9.0&p=demo&f=json
{
"subsonic-response": {
**"status": "ok",**
"version": "1.16.0",
"type": "funkwhale",
"funkwhaleVersion": "0.17",
"detail": "Authentication credentials were not provided."
}
}
Subsonic
{
"subsonic-response": {
**"status": "failed",**
"version": "1.16.1",
"error": {
"code": 10,
"message": "Required parameter is missing."
}
}
}
In addition to the "ok" / "failed" difference, Funkwhale also reports differently using a "detail" property instead of the error dictionary used by Subsonic.