View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0025384||mantisbt||api rest||public||2019-01-25 14:12||2019-01-31 02:57|
|Target Version||Fixed in Version|
|Summary||0025384: Get issues: Inconsistent error handling/reporting|
The different flavors of 'Get Issues' with restrictions (issue_id, project_id, filter_id) handle missing entities inconsistent.
|Tags||No tags attached.|
To get at least rid of the 500 in (3.) the call
in 'mc_filter_get_issues' (api\soap\mc_filter_api.php) should be replaced with
Then (3.) is put on par with (4.) and returns
As I am no specialist in designing REST API's, @vboctor what @obmsch wrote at 0025384:0061300 is certainly better than what we have now, and is the same way how the similar function
I am note complete sure if HTTP status 200, 'OK' in combination with some more status information in response is the right way to deal with it, or if HTTP code 404 is also the right one for cases 3. and 4.
Thanks @obmsch for reporting the bug. The correct behavior is as follows:
Often the differences in behaviors occur due:
So in short all errors should behave like case 1 and 2 in 0025384:0061300
The same kind of behaviors should apply to other APIs, e.g. Getting a filter by id - which currently returns success and empty array when filter id is not found or is invalid. But this can be a different bug.
Pull Requests are welcome, if not, I will try to get to around to fixing this at some point.
I have reported bug 0025406 for get filter by id error handling and linked it to this issue.
@vboctor strings are not invalid in general. There are some hardcoded allowed values, see
Of course, it's a bit inconsistent as in
|2019-01-25 14:12||obmsch||New Issue|
|2019-01-25 14:13||obmsch||Note Added: 0061300|
|2019-01-30 15:05||atrol||Status||new => confirmed|
|2019-01-30 15:05||atrol||Note Added: 0061335|
|2019-01-31 01:16||vboctor||Note Added: 0061343|
|2019-01-31 01:28||vboctor||Relationship added||related to 0025406|
|2019-01-31 01:28||vboctor||Note Added: 0061344|
|2019-01-31 02:57||atrol||Note Added: 0061346|