Farooq Ayoade created FINERACT-2446:
---------------------------------------
Summary: ax Group and Tax Component APIs return HTTP 500 when no
record is found (empty result), instead of returning a proper HTTP 404 Not
Found.
Key: FINERACT-2446
URL: https://issues.apache.org/jira/browse/FINERACT-2446
Project: Apache Fineract
Issue Type: Bug
Components: System
Reporter: Farooq Ayoade
When calling the tax configuration endpoints with IDs that do not exist, the
underlying lookup returns an empty result, which is currently translated into
an unhandled exception and exposed as HTTP 500 Internal Server Error. These are
not unexpected server failures; they are standard “resource not found” cases
and should be mapped to HTTP 404.Endpoints affected:
* Tax Group
* GET /taxes/group/\{taxGroupId} – non‑existent taxGroupId → empty result →
500 (should be 404).
* PUT /taxes/group/\{taxGroupId} – non‑existent taxGroupId on update → empty
result → 500 (should be 404).
* Tax Component
* GET /taxes/component/\{taxComponentId} – non‑existent taxComponentId → empty
result → 500 (should be 404).
As a Fineract developer, I’d like to:
# Locate where empty results from the tax group / tax component lookup are
turned into generic exceptions.
# Change the logic so that:
* Empty result for the requested ID is explicitly mapped to HTTP 404 Not Found
with a clear error code/message (e.g. error.msg.tax.group.not.found,
error.msg.tax.component.not.found).
* Only truly unexpected failures still return HTTP 500.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)