# Path: pale/response.py
# class PaleBaseResponse(object):
#     def __init__(self, *args):
#         super(PaleBaseResponse, self).__init__(*args)
#         if args:
#             self.message = args[0]
#         else:
#             self.message = "i am a teapot"
# 
#     @property
#     def response(self):
#         http_status = getattr(self, 'http_status_code', 418)
#         response_body = getattr(self, 'response_body', "i am a teapot")
#         headers = getattr(self, 'headers', None)
#         return (response_body, http_status, headers)


from pale.response import PaleBaseResponse

class BasePaleError(PaleBaseResponse, Exception):
    http_status_code = 500

    @property
    def response_body(self):

# Path: pale/response.py
# class PaleBaseResponse(object):
#     def __init__(self, *args):
#         super(PaleBaseResponse, self).__init__(*args)
#         if args:
#             self.message = args[0]
#         else:
#             self.message = "i am a teapot"
# 
#     @property
#     def response(self):
#         http_status = getattr(self, 'http_status_code', 418)
#         response_body = getattr(self, 'response_body', "i am a teapot")
#         headers = getattr(self, 'headers', None)
#         return (response_body, http_status, headers)


# Path: pale/errors/base.py
from pale.response import PaleBaseResponse


class BasePaleError(PaleBaseResponse, Exception):
    http_status_code = 500

    @property
    def response_body(self):

        return '{"error": "%s"}' % (self.message, )