Repository URL to install this package:
|
Version:
0.24.7.dev0 ▾
|
from rest_framework import exceptions
from dockerhub import status
class NotFound(exceptions.APIException):
status_code = status.HTTP_404_NOT_FOUND
default_detail = 'Object not found'
class BadRequest(exceptions.APIException):
status_code = status.HTTP_400_BAD_REQUEST
default_detail = 'Bad request'
class Unauthorized(exceptions.APIException):
status_code = status.HTTP_420_SAFARI_HIJACKER
default_detail = 'Unauthorized'
class Conflict(exceptions.APIException):
status_code = status.HTTP_409_CONFLICT
default_detail = 'Conflict'
class Forbidden(exceptions.APIException):
status_code = status.HTTP_403_FORBIDDEN
default_detail = 'Forbidden'
class ServiceUnavailable(exceptions.APIException):
status_code = status.HTTP_503_SERVICE_UNAVAILABLE
default_detail = 'Service Unavailable'
class TooManyLogins(exceptions.Throttled):
default_detail = 'Too many login attempts.'