github.com/inflatablewoman/deis@v1.0.1-0.20141111034523-a4511c46a6ce/controller/api/exceptions.py (about) 1 """ 2 Deis API exception classes. 3 """ 4 5 from __future__ import unicode_literals 6 7 from rest_framework.exceptions import APIException 8 9 10 class AbstractDeisException(APIException): 11 """ 12 Abstract class in which all Deis Exceptions and Errors should extend. 13 14 This exception is subclassed from rest_framework's APIException so that 15 subclasses can change the status code to something different than 16 "500 SERVER ERROR." 17 """ 18 19 def __init__(self, detail=None): 20 self.detail = detail 21 22 class Meta: 23 abstract = True