View Issue Details

IDProjectCategoryView StatusLast Update
0028927mantisbtapi restpublic2022-04-13 12:10
Reporterscopen-marc Assigned Tocommunity  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.24.4 
Target Version2.25.3Fixed in Version2.25.3 
Summary0028927: Slim Application Error when RestFault generated
Description

When calling ApiObjectFactory::throwIfFault() to check whether an API call returned a fault (RestFault or SoapFault depending of the API type), if that is indeed the case, a LegacyApiFaultException is created by getting the message and code from the fault object.

This is done by calling getCode() and getMessage() on the fault. Yet, RestFault implements none of those methods (contrary to SoapFault, which extends PHP's standard Exception class).

This causes a Slim Application Error page in HTML instead of the exected JSON error response.

Additional Information

Following my own Github pull request 0001762 : https://github.com/mantisbt/mantisbt/pull/1762

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master-2.25 702a0b85

2021-06-30 02:25

scopen-marc

Committer: dregad


Details Diff
Fix call to undefined methods when handling RestFault

Fixes 0028927, PR https://github.com/mantisbt/mantisbt/pull/1762

Signed-off-by: Damien Regad <dregad@mantisbt.org>

Original commit amended to fix whitespace.
Affected Issues
0028927
mod - api/soap/mc_api.php Diff File