View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023714 | mantisbt | api rest | public | 2017-12-09 00:37 | 2018-02-06 21:17 |
Reporter | vboctor | Assigned To | vboctor | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 2.9.0 | ||||
Target Version | 2.11.0 | Fixed in Version | 2.11.0 | ||
Summary | 0023714: Failing REST API requests should include Mantis error code and localized message | ||||
Description | Currently we return an http error code and English message from code. We should return a json that includes Mantis error code (as in constants file), exception message and localized message for display to user. | ||||
Tags | No tags attached. | ||||
The following PR handles the thrown |
|
MantisBT: master c0747fc8 2017-12-08 19:41 Details Diff |
Improve REST API error handling - Specific route handlers don’t need to catch exceptions just to return them in the response. - In case of errors include a json with Mantis error code, message, and localized message for thrown exceptions. - Convert RestFault and throw, though in this case only include the message in json, no code or localized message. LegacyApiFaultException can be removed once all APIs throw proper exceptions instead of returning RestFault. Fixes 0023714 |
Affected Issues 0023714 |
|
mod - api/rest/index.php | Diff File | ||
mod - api/rest/restcore/issues_rest.php | Diff File | ||
mod - api/soap/mantisconnect.php | Diff File | ||
mod - api/soap/mc_api.php | Diff File | ||
mod - api/soap/mc_core.php | Diff File | ||
mod - core/error_api.php | Diff File | ||
add - core/exceptions/LegacyApiFaultException.php | Diff File |