View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
18203Bug reportsRemoteControlpublic2022-08-18 10:55
Reporterchimp358 Assigned Togabrieljenik  
PrioritynoneSeveritytrivial 
Status closedResolutionfixed 
Product Version5.3.x 
Summary18203: RemoteControl method update_response error response is inconsistent with other methods
Description

When an error is encountered in processing an RPC request, most other methods return an array of the form array('status' => '<Some Error Message>'). However, the update_response method instead returns strings.

For consistency reasons, it would be good if this method returned a similar array. It seems like all that would need to be done is update the responses, for example change

return 'Error: No survey response table';

to

return array('status' => 'Error: No survey response table');
Steps To Reproduce

Steps to reproduce

Request the RPC method update_response with a non-existing token.

Expected result

{
  "status": "No matching Response"
}

Actual result

"Error: No matching Response."
TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)5.3.19+220607
I will donate to the project if issue is resolvedNo
BrowserNA
Database type & versionNA
Server OS (if known)NA
Webserver software & version (if known)NA
PHP VersionNA

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-06-21 10:27

developer   ~70422

Good idea, but broke API

chimp358

chimp358

2022-06-21 17:24

reporter   ~70456

@DenisChenu Yeah, It would be a breaking change. Is there a next or develop branch where breaking changes can be merged?

DenisChenu

DenisChenu

2022-06-21 17:54

developer   ~70457

develop allow API update, unsure for API broker …

gabrieljenik

gabrieljenik

2022-06-24 17:52

manager   ~70523

Hmm I would say this is still a bug.
Needs to be corrected. Agree, probably on DEV, not on a minor release.

chimp358

chimp358

2022-06-24 18:31

reporter   ~70526

@gabrieljenik thanks for chiming in! If that's the case then I'm happy to submit a PR :)

gabrieljenik

gabrieljenik

2022-06-24 18:46

manager   ~70527

Sure, let's do it on DEV. It will need to be corrected at some point

chimp358

chimp358

2022-06-28 05:13

reporter   ~70581

@gabrieljenik I've started a PR: https://github.com/LimeSurvey/LimeSurvey/pull/2483

gabrieljenik

gabrieljenik

2022-06-28 14:58

manager   ~70586

Thanks!

chimp358

chimp358

2022-07-29 04:48

reporter   ~71238

this has been merged to develop

guest

guest

2022-08-18 10:55

viewer   ~71477

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=33758

Related Changesets

LimeSurvey: master 2ff0eb5d

2022-07-11 15:06:47

chimp358


Committer: GitHub Details Diff
Fixed issue 18203: Return arrays instead of strings from update_response (#2483) Affected Issues
18203
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2022-06-21 09:34 chimp358 New Issue
2022-06-21 10:27 DenisChenu Note Added: 70422
2022-06-21 10:27 DenisChenu Bug heat 0 => 2
2022-06-21 17:24 chimp358 Note Added: 70456
2022-06-21 17:24 chimp358 Bug heat 2 => 4
2022-06-21 17:54 DenisChenu Note Added: 70457
2022-06-24 17:52 gabrieljenik Note Added: 70523
2022-06-24 17:52 gabrieljenik Bug heat 4 => 6
2022-06-24 17:53 gabrieljenik Status new => confirmed
2022-06-24 18:31 chimp358 Note Added: 70526
2022-06-24 18:46 gabrieljenik Note Added: 70527
2022-06-28 05:13 chimp358 Note Added: 70581
2022-06-28 14:58 gabrieljenik Note Added: 70586
2022-06-28 14:58 gabrieljenik Status confirmed => ready for code review
2022-07-29 04:48 chimp358 Note Added: 71238
2022-07-29 15:03 gabrieljenik Assigned To => gabrieljenik
2022-07-29 15:03 gabrieljenik Status ready for code review => closed
2022-07-29 15:03 gabrieljenik Resolution open => fixed
2022-08-18 10:55 chimp358 Changeset attached => LimeSurvey master 2ff0eb5d
2022-08-18 10:55 guest Note Added: 71477
2022-08-18 10:55 guest Bug heat 6 => 8