argoproj/argo-workflows · error

request failed %s

Error message

request failed %s

What it means

The argo cp HTTP GET to the argo-server artifact endpoint returned a non-200 status; the error text is the HTTP status line (e.g. 404 Not Found). Transport-level failures are reported separately as 'request failed with'.

Source

Thrown at cmd/argo/commands/cp.go:141

}

func getAndStoreArtifactData(ctx context.Context, namespace string, workflowName string, nodeID string, artifactName string, fileName string, customPath string, c *http.Client, argoServerOpts apiclient.ArgoServerOpts) error {
	request, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("%s/artifacts/%s/%s/%s/%s", argoServerOpts.GetURL(), namespace, workflowName, nodeID, artifactName), nil)
	if err != nil {
		return fmt.Errorf("failed to create request: %w", err)
	}
	authString, err := client.GetAuthString(ctx)
	if err != nil {
		return err
	}
	request.Header.Set("Authorization", authString)
	resp, err := c.Do(request)
	if err != nil {
		return fmt.Errorf("request failed with: %w", err)
	}
	defer resp.Body.Close()
	if resp.StatusCode != http.StatusOK {
		return fmt.Errorf("request failed %s", resp.Status)
	}
	artifactFilePath := filepath.Join(customPath, fileName)
	fileWriter, err := os.Create(artifactFilePath)
	if err != nil {
		return fmt.Errorf("creating file failed: %w", err)
	}
	defer fileWriter.Close()
	_, err = io.Copy(fileWriter, resp.Body)
	if err != nil {
		return fmt.Errorf("copying file contents failed: %w", err)
	}
	log.Printf("Created %q", fileName)
	return nil
}

View on GitHub (pinned to 35bff19146)

Solutions

  1. Check the workflow/node/artifact names in the command
  2. Verify argo-server URL, auth token, and RBAC permissions for artifact access
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at cmd/argo/commands/cp.go:141 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03). Data as JSON: /api/errors/c988db474ebc888c. Report an issue: GitHub.