add error event for workflow