Description
When tagDef and a linked tag is created, and delete of the tagDef is attempted with DELETE API - /service/tags/tagdef/{tagDefId}, it fails with 400 and no error message is returned. It will be helpful if we can return proper error message about why the delete operation failed.
Please find the steps to reproduce:
- Create a tag with PUT API - /service/tags/importservicetags
{ "op": "add_or_update", "serviceName": "hive_1", "tagVersion": 0, "tagDefinitions": { "0": { "name": "PII_LOCATION", "source": "Atlas", "attributeDefs": [ { "name": "names", "type": "String" } ], "id": 0, "isEnabled": true } }, "tags": { "0": { "type": "PII_LOCATION", "owner": 0, "attributes": { "location": "mumbai" }, "id": 0, "isEnabled": true } }, "serviceResources": [ { "serviceName": "hive_1", "resourceElements": { "database": { "values": [ "temp_db" ], "isExcludes": false, "isRecursive": false }, "table": { "values": [ "employee" ], "isExcludes": false, "isRecursive": false }, "column": { "values": [ "location" ], "isExcludes": false, "isRecursive": false } }, "id": 0, "isEnabled": true } ], "resourceToTagIds": { "0": [ 0 ] } }
- Confirm respective tag and tagDef are added to DB.
- Delete the tagDef with DELETE API - /service/tags/tagdef/{tagDefId}.
- Delete operation fails with 400 - Bad Request, no error message and empty body.