View Issue Details

IDProjectCategoryView StatusLast Update
0034493mantisbtapi restpublic2024-08-25 04:31
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.5.0 
Target Version2.26.3Fixed in Version2.26.3 
Summary0034493: REST API GET /issues endpoint returns HTML if given filter_id is not found
Description

The response is an HTTP 200 with an HTML error page. The endpoint should return HTTP 404 instead.

GET http://example.com/mantis/api/rest/issues?filter_id=8888

TagsNo tags attached.

Relationships

related to 0032249 closedvboctor Get Project Issues returns html if user doesn't have access to project 
related to 0026195 closedcproensa Error requesting issues using saved filter 
related to 0022768 closedvboctor Support retrieving issues based on filter or a project 
related to 0034586 closeddregad REST API GET /filters/{ID} returns empty array when ID does not exist 

Activities

Related Changesets

MantisBT: master-2.26 96903c1e

2024-08-17 07:01

dregad


Details Diff
Throw ClientException instead of trigger_error()

Use of trigger_error() caused the REST API to return an HTTP 200 code
with an HTML error page.

With the Exception, the endpoint now returns 404 as expected.

Fixes 0034493
Affected Issues
0034493
mod - core/filter_api.php Diff File