Subhrat Chaudhary created RANGER-4727:
-----------------------------------------

             Summary: When tagDef delete fails, error message is not returned
                 Key: RANGER-4727
                 URL: https://issues.apache.org/jira/browse/RANGER-4727
             Project: Ranger
          Issue Type: Bug
          Components: admin
            Reporter: Subhrat Chaudhary
            Assignee: Subhrat Chaudhary


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

 
{code:java}
{
    "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
        ]
    }
} {code}
 * 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.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to