You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Farooq Ayoade (Jira)" <ji...@apache.org> on 2026/01/21 10:16:00 UTC
[jira] [Updated] (FINERACT-2446) Tax Group and Tax Component APIs return HTTP 500 when no record is found (empty result), instead of returning a proper HTTP 404 Not Found.
[ https://issues.apache.org/jira/browse/FINERACT-2446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Farooq Ayoade updated FINERACT-2446:
------------------------------------
Summary: Tax Group and Tax Component APIs return HTTP 500 when no record is found (empty result), instead of returning a proper HTTP 404 Not Found. (was: 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.)
> Tax 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
> Priority: Minor
>
> 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)