[ https://issues.apache.org/jira/browse/RANGER-4736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anand Nadar reassigned RANGER-4736: ----------------------------------- Assignee: Anand Nadar > Tag Def creation api does not throw duplicate error when Tag Def with > existing name is being created > ---------------------------------------------------------------------------------------------------- > > Key: RANGER-4736 > URL: https://issues.apache.org/jira/browse/RANGER-4736 > Project: Ranger > Issue Type: Bug > Components: admin > Reporter: Anand Nadar > Assignee: Anand Nadar > Priority: Major > > API being used POST - service/tags/tagdefs > Case: > 1. There is an existing tagDef with name as SSN with no attributes. > Payload - > {code:java} > {"name":"SSN","attributeDefs":[]} {code} > 2. Now we are trying to create another tagDef with same name SSN but with > attributes - name: expires_one, type: dateTime > Payload - > {code:java} > {"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]} > {code} > *Actual Behaviour:* > The api returns 200, but the 2nd tagDef is not created and existing tagDef is > also not updated with attributes which are added in 2nd step. > *Expected behaviour:* > Since this is a POST api, an exception with duplicate object should be thrown > indicating that a tagDef with name as SSN already exists. -- This message was sent by Atlassian Jira (v8.20.10#820010)