{"record":{"id":"29c79f7a74a5cbca","repo":"dagger/dagger","slug":"org-q-not-found-29c79f","errorCode":null,"errorMessage":"org %q not found","messagePattern":"org %q not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cloud/org_sources.go","lineNumber":272,"sourceCode":"\t\t\tstatus\n\t\t\ttrialStart\n\t\t\ttrialEnd\n\t\t}\n\t}\n}\n`\n\nfunc (c *Client) OrgDetails(ctx context.Context, orgName string) (*OrgDetails, error) {\n\tvar data struct {\n\t\tOrg *OrgDetails `json:\"org\"`\n\t}\n\tif err := c.doGraphQL(ctx, \"GetOrgDetails\", getOrgDetailsOperation, map[string]any{\n\t\t\"org\": orgName,\n\t}, &data); err != nil {\n\t\treturn nil, err\n\t}\n\tif data.Org == nil {\n\t\treturn nil, fmt.Errorf(\"org %q not found\", orgName)\n\t}\n\treturn data.Org, nil\n}\n\nfunc (c *Client) Plans(ctx context.Context) (*PlansResponse, error) {\n\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, c.u.JoinPath(\"/plans\").String(), nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresp, err := c.h.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode < 200 || resp.StatusCode >= 300 {\n\t\treturn nil, fmt.Errorf(\"list plans: %s\", resp.Status)\n\t}\n\tvar plans PlansResponse","sourceCodeStart":254,"sourceCodeEnd":290,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/internal/cloud/org_sources.go#L254-L290","documentation":"OrgDetails queries Dagger Cloud's GraphQL GetOrgDetails operation and returns this error when the server responds successfully but the `org` field is null — i.e. no organization exists under the given name (or the caller lacks access to it). The client treats a null org as a not-found condition rather than a transport failure.","triggerScenarios":"Calling Client.OrgDetails(ctx, orgName) with an org name that does not exist in Dagger Cloud, a mistyped/renamed org slug, or an org the authenticated token cannot see (server returns org: null instead of a GraphQL error).","commonSituations":"DAGGER_CLOUD_ORG env var set to a stale org name after a rename; typo in `dagger --organization`; token scoped to a different org; org deleted while a cached name was used.","solutions":["Verify the org slug exists (check dagger.cloud or run the command with the correct --organization flag)","Check that the token in DAGGER_CLOUD_TOKEN belongs to that org and has access","Re-derive the org name from `dagger config` / cloud UI instead of hardcoding it","If the org was renamed, update scripts/env vars to the new slug"],"exampleFix":"// before\norg, err := client.OrgDetails(ctx, os.Getenv(\"DAGGER_CLOUD_ORG\"))\n// after\norgName := os.Getenv(\"DAGGER_CLOUD_ORG\")\nif orgName == \"\" {\n\treturn fmt.Errorf(\"DAGGER_CLOUD_ORG is not set\")\n}\norg, err := client.OrgDetails(ctx, orgName)\nif err != nil {\n\treturn fmt.Errorf(\"check your --organization flag / DAGGER_CLOUD_ORG (%q): %w\", orgName, err)\n}","handlingStrategy":"validation","validationCode":"if orgName == \"\" {\n\treturn fmt.Errorf(\"organization name is empty; set DAGGER_CLOUD_ORG or pass --organization\")\n}\n// optionally pre-check the slug format\nif strings.ContainsAny(orgName, \" /\\\\\") {\n\treturn fmt.Errorf(\"org slug %q looks invalid\", orgName)\n}","typeGuard":null,"tryCatchPattern":"org, err := client.OrgDetails(ctx, orgName)\nif err != nil {\n\tif strings.Contains(err.Error(), \"not found\") {\n\t\t// fall back to listing orgs or prompting the user\n\t}\n\treturn err\n}","preventionTips":["Derive the org name from `dagger` CLI config or the Cloud UI rather than hardcoding","Validate the org slug after any org rename","Keep DAGGER_CLOUD_TOKEN scoped to the org you reference","Print the org name being resolved in error paths to spot typos fast"],"tags":["graphql","cloud-api","not-found","auth"],"backgroundTag":"resource-not-found","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}