
from st2common.exceptions import StackStormBaseException


class StackStormDBObjectNotFoundError(StackStormBaseException):
    pass


class StackStormDBObjectMalformedError(StackStormBaseException):
    pass


from st2common.exceptions import StackStormBaseException


class StackStormDBObjectNotFoundError(StackStormBaseException):
    pass


class StackStormDBObjectMalformedError(StackStormBaseException):
    pass


class StackStormDBObjectConflictError(StackStormBaseException):
    """
    Exception that captures a DB object conflict error.
    """
    def __init__(self, message, conflict_id):
        super(StackStormDBObjectConflictError, self).__init__(message)
        self.conflict_id = conflict_id

Add a special exception for capturing object conflicts.
Add a special exception for capturing object conflicts.

  
  from st2common.exceptions import StackStormBaseException
  
  
  class StackStormDBObjectNotFoundError(StackStormBaseException):
      pass
  
  
  class StackStormDBObjectMalformedError(StackStormBaseException):
      pass
  
+ 
+ class StackStormDBObjectConflictError(StackStormBaseException):
+     """
+     Exception that captures a DB object conflict error.
+     """
+     def __init__(self, message, conflict_id):
+         super(StackStormDBObjectConflictError, self).__init__(message)
+         self.conflict_id = conflict_id
+ 
Add a special exception for capturing object conflicts.
## Code Before:

from st2common.exceptions import StackStormBaseException


class StackStormDBObjectNotFoundError(StackStormBaseException):
    pass


class StackStormDBObjectMalformedError(StackStormBaseException):
    pass

## Instruction:
Add a special exception for capturing object conflicts.
## Code After:

from st2common.exceptions import StackStormBaseException


class StackStormDBObjectNotFoundError(StackStormBaseException):
    pass


class StackStormDBObjectMalformedError(StackStormBaseException):
    pass


class StackStormDBObjectConflictError(StackStormBaseException):
    """
    Exception that captures a DB object conflict error.
    """
    def __init__(self, message, conflict_id):
        super(StackStormDBObjectConflictError, self).__init__(message)
        self.conflict_id = conflict_id
