{"id":"d91f0a32b86a45a0","repo":"docker/cli","slug":"nothing-found-in-stack-s","errorCode":null,"errorMessage":"nothing found in stack: %s","messagePattern":"nothing found in stack: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/stack/ps.go","lineNumber":64,"sourceCode":"\tflags.BoolVar(&opts.noResolve, \"no-resolve\", false, \"Do not map IDs to Names\")\n\tflags.VarP(&opts.filter, \"filter\", \"f\", \"Filter output based on conditions provided\")\n\tflags.BoolVarP(&opts.quiet, \"quiet\", \"q\", false, \"Only display task IDs\")\n\tflags.StringVar(&opts.format, \"format\", \"\", flagsHelper.FormatHelp)\n\treturn cmd\n}\n\n// runPS is the swarm implementation of docker stack ps\nfunc runPS(ctx context.Context, dockerCLI command.Cli, opts psOptions) error {\n\tapiClient := dockerCLI.Client()\n\tres, err := apiClient.TaskList(ctx, client.TaskListOptions{\n\t\tFilters: getStackFilterFromOpt(opts.namespace, opts.filter),\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(res.Items) == 0 {\n\t\treturn fmt.Errorf(\"nothing found in stack: %s\", opts.namespace)\n\t}\n\n\tif opts.format == \"\" {\n\t\topts.format = task.DefaultFormat(dockerCLI.ConfigFile(), opts.quiet)\n\t}\n\n\treturn task.Print(ctx, dockerCLI, res, idresolver.New(apiClient, opts.noResolve), !opts.noTrunc, opts.quiet, opts.format)\n}\n","sourceCodeStart":46,"sourceCodeEnd":73,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/stack/ps.go#L46-L73","documentation":"Error \"nothing found in stack: %s\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/stack/ps.go:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}