Fix incorrect error handling for resolveWorkflowOutputs