Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
hub-client / dockerhub / exceptions.py
Size: Mime:
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.'