bytedance/deer-flow · critical

result.message

Error message

result.message

What it means

The (auth) route group layout fetches a bootstrap/config result before render and switches on its status. For status 'config_error' it deliberately throws result.message — rendering is abandoned because the gateway reported a broken configuration (e.g. malformed config.yaml), and showing auth UI against a misconfigured backend would be misleading.

Source

Thrown at frontend/src/app/(auth)/layout.tsx:51

    case "unauthenticated":
      content = <AuthProvider initialUser={null}>{children}</AuthProvider>;
      break;
    case "gateway_unavailable":
      // Auth pages have no banner of their own, so render one here. The
      // fallback's AuthProvider replaces the bare-HTML branch that
      // previously locked users out without any logout/retry capability.
      content = (
        <GatewayOfflineFallback renderBanner>
          <div className="flex h-screen flex-col items-center justify-center gap-4">
            <p className="text-muted-foreground">
              Service temporarily unavailable.
            </p>
          </div>
        </GatewayOfflineFallback>
      );
      break;
    case "config_error":
      throw new Error(result.message);
    default:
      assertNever(result);
  }

  return <I18nProvider initialLocale={locale}>{content}</I18nProvider>;
}

View on GitHub (pinned to 1dd6ba1acb)

Solutions

  1. Run `make doctor` from the repo root — it reports configuration and requirement problems directly.
  2. Open the gateway logs/terminal: the thrown message is the gateway's own config validation text naming the offending key.
  3. Re-copy config.example.yaml to config.yaml and reapply only the settings you need, validating after each change.
  4. Restart the gateway after fixing config so the bootstrap endpoint returns a healthy status.

Example fix

# before: placeholder left in config.yaml
basic:
  model: YOUR_MODEL_HERE

# after: valid value
basic:
  model: deepseek-chat
Defensive patterns

Strategy: validation

Validate before calling

// In a wrapper around the bootstrap fetch:
// const result = await fetchBootstrap();
// if (result.status === 'config_error') render a friendly setup screen with result.message instead of letting the layout throw.

Type guard

function isConfigError(r: { status: string; message?: string }): boolean {
  return r.status === "config_error" && typeof r.message === "string";
}

Try / catch

// Prefer replacing the throw with a boundary:
// <ErrorBoundary fallback={<SetupHelpScreen message={result.message} />}> ... layout ... </ErrorBoundary>

Prevention

When it happens

Trigger: The bootstrap endpoint signals config_error: repo-root config.yaml missing required keys or failing schema validation, invalid nested sections (e.g. bad model or channel config), or example values left unexpanded after copying config.example.yaml.

Common situations: Fresh clone where `make config` was skipped or the copied config.yaml still contains placeholder values; an edit to config.yaml introducing a syntax/schema error; gateway restarted with an unreadable config file.

Related errors


AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14). Data as JSON: /api/errors/97bcc60e71157bb9. Report an issue: GitHub.