# Path: pale/errors/base.py
# class BasePaleError(PaleBaseResponse, Exception):
#     http_status_code = 500
# 
#     @property
#     def response_body(self):
#         return '{"error": "%s"}' % (self.message, )


from .base import BasePaleError

class APIError(BasePaleError):
    @classmethod
    def Forbidden(cls, message="You don't have permission to do that."):
        err = cls(message)
        err.http_status_code = 403
        return err

    @classmethod
    def NotFound(cls, message):
        err = cls(message)
        err.http_status_code = 404
        return err

    @classmethod
    def UnprocessableEntity(cls, message):
        err = cls(message)
        err.http_status_code = 422
        return err

    @classmethod
    def UnsupportedMedia(cls, message):
        err = cls(message)
        err.http_status_code = 415

# Path: pale/errors/base.py
# class BasePaleError(PaleBaseResponse, Exception):
#     http_status_code = 500
# 
#     @property
#     def response_body(self):
#         return '{"error": "%s"}' % (self.message, )


# Path: pale/errors/api_error.py
from .base import BasePaleError


class APIError(BasePaleError):
    @classmethod
    def Forbidden(cls, message="You don't have permission to do that."):
        err = cls(message)
        err.http_status_code = 403
        return err

    @classmethod
    def NotFound(cls, message):
        err = cls(message)
        err.http_status_code = 404
        return err

    @classmethod
    def UnprocessableEntity(cls, message):
        err = cls(message)
        err.http_status_code = 422
        return err

    @classmethod
    def UnsupportedMedia(cls, message):
        err = cls(message)
        err.http_status_code = 415

        return err