def raise_412(instance, msg=None):
    instance.response.status = 412
    if msg:
        instance.response.body_raw = {'error': msg}
    raise ResponseException(instance.response)
Succeeds.
dataset/ETHPy150Open pneff/wsgiservice/wsgiservice/status.py/raise_412--crossover with--dataset/ETHPy150Open beetbox/beets/beetsplug/bpd/__init__.py/BaseServer.cmd_ping