Welcome to the LimeSurvey Community Forum

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

Error field in remotecontrol's response

  • silentMantra
  • silentMantra's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 7 months ago #227130 by silentMantra
Error field in remotecontrol's response was created 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.

Thanks!

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 years 7 months ago #227312 by DenisChenu
Replied by DenisChenu on topic Error field in remotecontrol's response
Because it's not a JSON-RPC error maybe ?

www.jsonrpc.org/specification_v1#a1.2Response

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose