argoproj/argo-workflows · error
CodeNotFound
CodeNotFound
Error message
res.Status
What it means
The HTTP artifact driver maps a 404 response from the remote server to a CodeNotFound Argo error whose message is the HTTP status line (e.g. "404 Not Found"). retrieveContent is shared by Load and OpenStream, so both artifact download and streaming surface this error.
Source
Thrown at workflow/artifacts/http/http.go:60
}
for _, h := range inputArtifact.HTTP.Headers {
req.Header.Add(h.Name, h.Value)
}
if h.Username != "" && h.Password != "" {
req.SetBasicAuth(h.Username, h.Password)
}
default:
return http.Response{}, errors.InternalErrorf("Either Artifactory or HTTP artifact needs to be configured")
}
// Note that we will close the response body in either `Load()`
// or `ArtifactServer.returnArtifact()`, which is the caller of `OpenStream()`.
res, err := h.Client.Do(req) //nolint:bodyclose
if err != nil {
return http.Response{}, err
}
if res.StatusCode == http.StatusNotFound {
return http.Response{}, errors.New(errors.CodeNotFound, res.Status)
}
if res.StatusCode < 200 || res.StatusCode >= 300 {
return http.Response{}, errors.InternalErrorf("loading content from %s failed with reason: %s", url, res.Status)
}
return *res, nil
}
// Load reads the artifact from the HTTP URL
func (h *ArtifactDriver) Load(ctx context.Context, inputArtifact *wfv1.Artifact, path string) error {
lf, err := os.Create(path)
if err != nil {
return err
}
defer func() {
_ = lf.Close()
}()
res, err := h.retrieveContent(ctx, inputArtifact)
if err != nil {View on GitHub (pinned to 35bff19146)
Solutions
- Open the artifact `url` in a browser/curl to confirm it exists and returns 200.
- Fix the URL in the spec, including any templated segments that may resolve incorrectly.
- If the URL requires auth, configure http headers (e.g. Authorization) on the artifact so the server doesn't return 404/403.
- Check retention/TTL on the remote system so the file outlives the workflow.
Example fix
# before
- http:
url: https://example.com/builds/{{workflow.parameters.id}}/artifcat.zip
# after
- http:
url: https://example.com/builds/{{workflow.parameters.id}}/artifact.zip Defensive patterns
Strategy: validation
Validate before calling
resp, err := http.Head(artifactURL)
if err != nil || resp.StatusCode != 200 {
return fmt.Errorf("artifact URL %s not reachable: %v", artifactURL, err)
} Try / catch
var coded errors.CodedError
if errors.As(err, &coded) && coded.Code() == errors.CodeNotFound {
// treat as 404: check URL, auth headers, retention
} Prevention
- curl/HEAD-check templated URLs after parameter resolution
- Attach required http headers (auth) to the artifact spec
- Ensure remote retention policy outlives the workflow run
When it happens
Trigger: Calling Load() or OpenStream() on an http artifact when the remote server responds with HTTP status 404 to the GET request.
Common situations: URL typo or file renamed/moved; artifact expired on the remote (e.g. presigned URL or CI artifact TTL); template expression producing a wrong path; server path requires auth and returns 404 instead of 401.
Related errors
- failed to stream artifact: %v
- CodeNotFound
- CodeNotImplemented
- failed to get and store artifact data: %w
- request failed with: %w
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/031c77d31b3d596f.
Report an issue: GitHub.