David Kantor created ATLAS-356:
----------------------------------

             Summary: deleteTrait throws same exception for different error 
conditions
                 Key: ATLAS-356
                 URL: https://issues.apache.org/jira/browse/ATLAS-356
             Project: Atlas
          Issue Type: Bug
            Reporter: David Kantor
            Priority: Minor


deleteTrait is throwing EntityNotFoundException when either the trait being 
deleted is not found on the entity or when the entity itself is not found.  
This makes it difficult for callers to determine the actual error, as it forces 
them to parse the stack trace looking for a specific error message.  This is a 
brittle solution as messages can change and in the future are likely to be 
translated.  A specific exception should be thrown if the trait is not found as 
that is a very different condition which callers could handle as a non-error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to