View Issue Details

IDProjectCategoryView StatusLast Update
0028927mantisbtapi restpublic2021-07-19 06:37
Reporterscopen-marc Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version2.24.4 
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.