{"record":{"id":"038476637e6042e1","repo":"docker/compose","slug":"not-implemented","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"error_code","errorClass":"ErrNotImplemented","httpStatus":null,"severity":"error","filePath":"pkg/api/errors.go","lineNumber":39,"sourceCode":")\n\nconst (\n\t// ExitCodeLoginRequired exit code when command cannot execute because it requires cloud login\n\t// This will be used by VSCode to detect when creating context if the user needs to login first\n\tExitCodeLoginRequired = 5\n)\n\nvar (\n\t// ErrNotFound is returned when an object is not found\n\tErrNotFound = errors.New(\"not found\")\n\t// ErrAlreadyExists is returned when an object already exists\n\tErrAlreadyExists = errors.New(\"already exists\")\n\t// ErrForbidden is returned when an operation is not permitted\n\tErrForbidden = errors.New(\"forbidden\")\n\t// ErrUnknown is returned when the error type is unmapped\n\tErrUnknown = errors.New(\"unknown\")\n\t// ErrNotImplemented is returned when a backend doesn't implement an action\n\tErrNotImplemented = errors.New(\"not implemented\")\n\t// ErrUnsupportedFlag is returned when a backend doesn't support a flag\n\tErrUnsupportedFlag = errors.New(\"unsupported flag\")\n\t// ErrCanceled is returned when the command was canceled by user\n\tErrCanceled = errors.New(\"canceled\")\n\t// ErrParsingFailed is returned when a string cannot be parsed\n\tErrParsingFailed = errors.New(\"parsing failed\")\n\t// ErrNoResources is returned when operation didn't selected any resource\n\tErrNoResources = errors.New(\"no resources\")\n)\n\n// IsNotFoundError returns true if the unwrapped error is ErrNotFound\nfunc IsNotFoundError(err error) bool {\n\treturn errors.Is(err, ErrNotFound)\n}\n\n// IsAlreadyExistsError returns true if the unwrapped error is ErrAlreadyExists\nfunc IsAlreadyExistsError(err error) bool {\n\treturn errors.Is(err, ErrAlreadyExists)","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/pkg/api/errors.go#L21-L57","documentation":"api.ErrNotImplemented signals that the active backend does not implement the requested action. A concrete in-repo example is cmd/compose/ps.go parseFilter: --filter source=... returns api.ErrNotImplemented because source filtering is defined but not yet built. It lets the api surface declare capability gaps explicitly.","triggerScenarios":"Running `docker compose ps --filter source=...`; or programmatically invoking an api method that the selected backend (e.g. compose vs cloud) has not implemented, which returns this sentinel.","commonSituations":"Using flags documented for other docker commands that compose has reserved but not implemented yet; switching a workflow to a backend with a smaller feature set and hitting unimplemented endpoints.","solutions":["Avoid the unsupported operation: for ps, filter with status=... or post-process JSON output instead of source=.","Check the current compose release notes — the capability may exist in a newer version, so upgrade.","In Go code, branch on api.IsErrNotImplemented (errors.Is) to degrade gracefully."],"exampleFix":"# before\ndocker compose ps --filter source=local\n\n# after\ndocker compose ps --format json | jq '.[] | select(.Publishers[0].Name == \"local\" or true)'","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"func isNotImplemented(err error) bool { return api.IsErrNotImplemented(err) }","tryCatchPattern":"if err := psOpts.parseFilter(); err != nil {\n    if api.IsErrNotImplemented(err) {\n        // feature reserved but absent: skip or use JSON filtering instead\n    }\n    return err\n}","preventionTips":["Check release notes before adopting flags like --filter source for ps.","Degrade gracefully on IsErrNotImplemented instead of failing the whole script."],"tags":["api","sentinel-error","not-implemented","ps"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}