Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Error field in remotecontrol's response

1 year 1 month ago #227130 by silentMantra
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.27.1+210531
Own server or LimeSurvey hosting: own server
Hi, I'm not sure if this is the right category to ask this question, so if it's the wrong one I apologise.
Whenever I do a post request to remotecontrol I always get a response like {"id":1,"result":something,"error":null}. However even when there is an error with the request, say for example the session ID is invalid, I get {"id":1,"result":"Invalid session key","error":null} or if I cannot edit a response after it has been marked as completed I get {"id":1,"result":"Error: Survey does not allow edit after completion.","error":null}. As you can see the value of "error" is always null and the value of "result" may or may not contain the word "Error" in it. This makes it hard to respond accordingly to the error, since it is so inconsistent. Is the "error" field ever used when issues like these occur? If not, is it the intended behaviour or is it just an issue with my version?
I think it would be so much better if there were some sorts of error codes that one could parse, instead of only having error messages.


Please Log in to join the conversation.

1 year 1 month ago #227312 by DenisChenu
Because it's not a JSON-RPC error maybe ?


Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose