

@staticmethod
def from_error(message, code=None):
    cls = {
        404: ChefServerNotFoundError,
    }.get(code, ChefServerError)
    return cls(message, code)

dataset/ETHPy150Open coderanger/pychef/chef/exceptions.py ChefServerError.from_error/original