'Add the error to the task data'

def after_return(self, status, retval, task_id, args, kwargs, einfo):

    (_, info) = self.get_task_data()
    if (status == states.FAILURE):
        info['error'] = retval
    if STATUS_UPDATES_ENABLED:
        self.update_state(state=status, meta=info)
