Dharshana M Krishnamoorthy created ATLAS-4525:
-------------------------------------------------

             Summary: SchemaViolationException should be handled gracefully.
                 Key: ATLAS-4525
                 URL: https://issues.apache.org/jira/browse/ATLAS-4525
             Project: Atlas
          Issue Type: Bug
            Reporter: Dharshana M Krishnamoorthy


SchemaViolationException should be handled gracefully.

As this is a user error it should throw 400 instead of throwing 500 error

*Repro steps:* 

  Test SchemaViolationException while modifying unique attribute of an entity

    1) Create an entity type with attribute(say attrib_1) that has isUnique set 
to true
    2) Create 2 entities with this type
    3) These 2 entities will now have the attribute attrib_1
    4) Update the value of attrib_1 as attrib_1_value in entity 1 (This is 
succeed)
    5) Update the value of attrib_1 as attrib_1_value in entity 2 ( This will 
fail with SchemaViolationException) and error code 500

Since this is a user error, we need to handle it gracefully and throw bad 
request with the right reason instead of throwing server exception with 500 
error code
   



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to