class ErrorWithStatusCode(Exception):

    def __init__(self, *args, **kwargs):
        if args:
            self.message = args[0]
            self.args = args

    @property
    def status_code(self):
        if len(self.args) > 1:
            return self.args[1]
        else:
            return 500


class SearchError(Exception):
    pass
