dagger/dagger · error

org %q not found

Error message

org %q not found

What it means

Returned by Client.OrgChecks in internal/cloud/checks.go when the GetOrgChecks GraphQL response comes back with a nil org — Dagger Cloud has no org matching the requested name for the authenticated user. The error embeds the requested org name for diagnosis.

Source

Thrown at internal/cloud/checks.go:235

	vars := map[string]any{
		"org":   org,
		"repos": expandRepoForms(repos),
	}
	if first > 0 {
		vars["first"] = first
	}
	var data struct {
		Org *struct {
			Checks struct {
				Nodes []CheckCommit `json:"nodes"`
			} `json:"checks"`
		} `json:"org"`
	}
	if err := c.doGraphQL(ctx, "GetOrgChecks", getOrgChecksOperation, vars, &data); err != nil {
		return nil, err
	}
	if data.Org == nil {
		return nil, fmt.Errorf("org %q not found", org)
	}
	return data.Org.Checks.Nodes, nil
}

func (c *Client) UserChecks(
	ctx context.Context,
	repos []string,
	first int,
) ([]CheckCommit, error) {
	vars := map[string]any{
		"repos": expandRepoForms(repos),
	}
	if first > 0 {
		vars["first"] = first
	}
	var data struct {
		User *struct {
			Checks struct {

View on GitHub (pinned to 82ba2681db)

Solutions

  1. Verify the org slug on Dagger Cloud (Settings > Organizations) and fix the spelling/case
  2. Confirm your DAGGER_CLOUD_TOKEN / logged-in user is a member of that org
  3. Re-authenticate with 'dagger login' if the token is stale or revoked
  4. Update any configured org name (config/flags) after an org rename

Example fix

// before
nodes, err := client.OrgChecks(ctx, "my-orgnization")
// after
const org = "my-organization" // verify exact slug on Dagger Cloud
nodes, err := client.OrgChecks(ctx, org)
if err != nil && strings.Contains(err.Error(), "not found") {
    return fmt.Errorf("check org %q exists and your token has access: %w", org, err)
}
Defensive patterns

Strategy: validation

Validate before calling

org := "my-organization"
if org == "" || !regexp.MustCompile(`^[a-z0-9][a-z0-9-]*$`).MatchString(org) {
    return fmt.Errorf("invalid org slug %q", org)
}
// ensure credentials exist first
if os.Getenv("DAGGER_CLOUD_TOKEN") == "" { return fmt.Errorf("not logged in") }

Try / catch

nodes, err := client.OrgChecks(ctx, org)
if err != nil {
    if strings.Contains(err.Error(), "not found") {
        return fmt.Errorf("org %q not found: verify slug and token access", org)
    }
    return err
}

Prevention

When it happens

Trigger: Calling OrgChecks with an org slug that doesn't exist, isn't accessible to the current credentials, or where the GraphQL query returned null for org (e.g. bad org name in .telemetry/cloud config or dagger cloud flags).

Common situations: Typo in the org slug; org renamed on Dagger Cloud; API token belongs to a different org or lacks access; running 'dagger cloud' commands with a stale org configured.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05). Data as JSON: /api/errors/d5a352e876b1a950. Report an issue: GitHub.