-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Description
Currently, when attempting to delete an already inactive obligation classification, the DeleteObligationClassification function simply returns an empty 200 OK response. This behavior does not provide clear feedback to the user, leading to confusion as to whether any action was taken.
Instead, the API should return a meaningful JSON response indicating that the classification was already inactive and no action was needed.
Steps to Reproduce:
-
Ensure that an obligation classification exists in the database and is marked as inactive (
Active = false). -
Run the following
cURLcommand to send aDELETErequest:curl -X 'DELETE' \ 'http://localhost:8080/api/v1/obligations/classifications/GREEN' \ -H 'accept: application/json' \ -H 'Authorization: Bearer token'
-
Observe the response:
- Current behavior: The API returns an empty
200 OKresponse.
After fix behavior: The API should return a JSON response like:
{ "status": 200, "message": "Obligation classification 'GREEN' is already inactive", "error": "no action needed", "path": "/api/v1/obligations/classifications/GREEN", "timestamp": "2025-03-25T12:00:00Z" } - Current behavior: The API returns an empty
Metadata
Metadata
Assignees
Labels
No labels