Add PreconditionFailed exception

This commit is contained in:
George Hickman 2013-03-20 23:10:24 -07:00
parent ebb47bb38f
commit 53ca0c02b0

View File

@ -88,6 +88,14 @@ class Throttled(APIException):
self.detail = detail or self.default_detail self.detail = detail or self.default_detail
class PreconditionFailed(APIException):
status_code = status.HTTP_412_PRECONDITION_FAILED
default_detail = 'Object has been updated since you retrieved it.'
def __init__(self, detail=None):
self.detail = detail or self.default_detail
class ConfigurationError(Exception): class ConfigurationError(Exception):
""" """
Indicates an internal server error. Indicates an internal server error.