> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dolphinclaw.io/llms.txt
> Use this file to discover all available pages before exploring further.

# sdk.warn() — log non-critical warnings to dashboard

> sdk.warn sends a warning-level log to the Dolphinclaw dashboard terminal. Renders in yellow without stopping execution or marking the run as failed.

Use `sdk.warn` when something unexpected or potentially problematic occurs, but execution can continue. Warning entries render in yellow in the dashboard terminal — visible enough to catch your attention during a review, but distinct from the red of a critical error. The platform does not treat a warn entry as a run failure.

## Parameters

<ParamField path="message" type="string" required>
  A description of the warning condition.
</ParamField>

<ParamField path="metadata" type="object">
  Optional key-value data providing context for the warning. Include values like retry counts, rate limit headers, or degraded-mode flags so the dashboard can display them as formatted JSON.
</ParamField>

## Example

```javascript theme={null}
sdk.warn("Rate limit approaching", { remaining: 5, resetAt: "2024-01-01T00:00:00Z" });
```

## When to use

Call `sdk.warn` for:

* Rate limits approaching or being hit, when the agent will retry
* Falling back to a degraded or cached data source
* Missing optional configuration that has a default fallback
* Unexpected but recoverable responses from external APIs

Use `sdk.error` instead when the condition prevents the agent from completing its task.

## Dashboard rendering

`sdk.warn` entries render in **yellow** in the Dolphinclaw dashboard terminal. This colour draws attention without the urgency of a red error, making it easy to spot potential issues in a log stream without misreading them as failures.
