{"record":{"id":"7e37d1378d7abc63","repo":"argoproj/argo-workflows","slug":"err-not-found","errorCode":"ERR_NOT_FOUND","errorMessage":"${err.Error()}","messagePattern":"\\$\\{err\\.Error\\(\\)\\}","errorType":"error_code","errorClass":"argoerr","httpStatus":null,"severity":"error","filePath":"util/archive/archive.go","lineNumber":32,"sourceCode":"\t\"github.com/argoproj/argo-workflows/v4/util/logging\"\n)\n\ntype flusher interface {\n\tFlush() error\n}\n\n// TarGzToWriter tar.gz's the source path to the supplied writer\nfunc TarGzToWriter(ctx context.Context, sourcePath string, level int, w io.Writer) error {\n\tsourcePath, err := filepath.Abs(sourcePath)\n\tif err != nil {\n\t\treturn errors.InternalErrorf(\"getting absolute path: %v\", err)\n\t}\n\tlogger := logging.RequireLoggerFromContext(ctx)\n\tlogger.WithField(\"source\", sourcePath).Info(ctx, \"tarring\")\n\tsourceFi, err := os.Stat(sourcePath)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn errors.New(errors.CodeNotFound, err.Error())\n\t\t}\n\t\treturn errors.InternalWrapError(err)\n\t}\n\tif !sourceFi.Mode().IsRegular() && !sourceFi.IsDir() {\n\t\treturn errors.InternalErrorf(\"%s is not a regular file or directory\", sourcePath)\n\t}\n\tif flush, ok := w.(flusher); ok {\n\t\tdefer func() { _ = flush.Flush() }()\n\t}\n\tgzw, err := gzip.NewWriterLevel(w, level)\n\tif err != nil {\n\t\treturn errors.InternalWrapError(err)\n\t}\n\tdefer util.Close(gzw)\n\ttw := tar.NewWriter(gzw)\n\tdefer util.Close(tw)\n\n\tif sourceFi.IsDir() {","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/util/archive/archive.go#L14-L50","documentation":"TarGzToWriter wraps an os.Stat failure on the source path (after abs-path resolution) with the underlying error text; most commonly the path does not exist. This is a thin re-wrap of the OS error, not a coded ArgoError at this line.","triggerScenarios":"Thrown at util/archive/archive.go:32 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the source path exists and is readable by the executor/container","Check the artifact staging path under /var/run/argo for typos or missing staged files"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}