def error_and_result(f):
@wraps(f)<EOL>def error_and_result_decorator(*args, **kwargs):<EOL><INDENT>return error_and_result_decorator_inner_fn(f, False, *args, **kwargs)<EOL><DEDENT>return error_and_result_decorator<EOL>
Format task result into json dictionary `{'data': task return value}` if no
exception was raised during the task execution. If there was raised an
exception during task execution, formats task result into dictionary
`{'error': exception message with traceback}`.