human
I wrote the below code

    @wraps(fun)
    def _inner(*args, **kwargs):
        try:
            retval = fun(*args, **kwargs)
        except Exception as exc:
            response = {u'status': u'failure', u'reason': safe_repr(exc)}
        else:
            response = {u'status': u'success', u'retval': retval}
        return JsonResponse(response)
    return _inner

What's a good function header?
assistant
#Here's a good function header.

def task_webhook(fun):