Follow Discord
Sweep 25 Sep 2026 · 19:33Z Build v2.1.283 504 read Stable v2.1.274 Latest v2.1.283 Next v2.1.283 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

762 pages for error.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

API usage primer for Claude Claude Developer Platform · in the page claude_api_primer …led` with a `budget_tokens` value) is not supported and returns a 400 error. Use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) (`type: adaptive`) instead. </Note>… apply Claude Developer Platform · in the page cli-sdks-libraries/cli/apply …ed as an agent, and a named YAML or JSON file that matches none is an error. ## Edit and reapply Running `ant apply` with no arguments reconciles every file the lockfile tracks. At a terminal, it al… scripting Claude Developer Platform · in the page cli-sdks-libraries/cli/scripting …the benefits of type safety in one sentence. Type safety catches errors at compile time rather than runtime, reducing bugs, improving code clarity, enabling better tooling support, and making cod… using Claude Developer Platform · in the page cli-sdks-libraries/cli/using …| | `--format-error`, `--transform-error` | Same as `--format` and `--transform` but applied to [error responses](https://platform.claude.com/do… apple-foundation-models Claude Developer Platform · in the page cli-sdks-libraries/libraries/apple-foundation-models …est fields to send, because sending a field a model rejects is a hard error. The constants carry the right capabilities. For an ID that isn't compiled in, declare what the model accepts (there is deli… openai-sdk Claude Developer Platform · in the page cli-sdks-libraries/libraries/openai-sdk …. Most unsupported fields are silently ignored rather than producing errors. These are all documented in the following sections. ### Output quality considerations If you’ve done lots of tweaking to… middleware Claude Developer Platform · in the page cli-sdks-libraries/middleware …(func(req *http.Request, next option.MiddlewareNext) (*http.Response, error) { // Before the request start := time.Now() slog.Info("sending request", "method", req.Method, "url", req.URL)… overview Claude Developer Platform · in the page cli-sdks-libraries/overview …rfaces, type safety, and built-in support for streaming, retries, and error handling. * **Libraries and integrations:** Packages and compatibility layers that expose Claude inside another framework's… csharp Claude Developer Platform · in the page cli-sdks-libraries/sdks/csharp …ateStreaming(parameters)) { Console.WriteLine(message); } ``` ## Error handling The SDK throws custom unchecked exception types: * `AnthropicApiException`: Base class for API errors. See this t… go Claude Developer Platform · in the page cli-sdks-libraries/sdks/go …Model: anthropic.ModelClaudeOpus5_5, }) if err != nil { panic(err.Error()) } for _, block := range message.Content { if textBlock, ok := block.AsAny().(anthropic.TextBlock); ok { fmt.Printl… java Claude Developer Platform · in the page cli-sdks-libraries/sdks/java …cribe(chunk -> { IO.println(chunk); }); // If you need to handle errors or completion of the stream client.async().messages().createStreaming(params).subscribe(new AsyncStreamResponse.Handler<>()… php Claude Developer Platform · in the page cli-sdks-libraries/sdks/php …stOptions::with(streamingTransporter: $myStreamingClient), ); ``` ## Error handling When the library is unable to connect to the API, or if the API returns a non-success status code (that is, a 4xx… For Amazon Bedrock support Claude Developer Platform · in the page cli-sdks-libraries/sdks/python …the file contents are read asynchronously automatically. ## Handling errors When the library is unable to connect to the API, or if the API returns a non-success status code (that is, 4xx or 5xx res… Automatically handles tool execution loop Claude Developer Platform · in the page cli-sdks-libraries/sdks/ruby …laude.com/docs/en/build-with-claude/structured-outputs). ## Handling errors When the library is unable to connect to the API, or if the API returns a non-success status code (that is, 4xx or 5xx res… typescript Claude Developer Platform · in the page cli-sdks-libraries/sdks/typescript …: [weatherTool] }); console.log(finalMessage.content); ``` ### Tool errors To report an error from a tool back to the model, throw a `ToolError` from the `run` function. Unlike a plain `Error`, `To… home Claude Developer Platform · in the page home …form.claude.com/docs/en/api/rate-limits"> Rate limits and errors </HomeJourneyLink> <HomeJourneyLink icon="calculator" href="https://platform.claude.com/docs/en/about-… admin-api Claude Developer Platform · in the page manage-claude/admin-api …eaningful names and descriptions for workspaces and API keys * Handle errors from failed operations * Regularly audit member roles and permissions * Clean up unused workspaces and expired invites * Mo… analytics-api Claude Developer Platform · in the page manage-claude/analytics-api …ness varies by query, so rather than assuming a fixed time, check the error response: requesting a date that is not yet available returns a 400 error naming the most recent available day. If data is n… api-and-data-retention Claude Developer Platform · in the page manage-claude/api-and-data-retention …age content, where it is protected under HIPAA safeguards. ### HIPAA error handling Your signed BAA is the official source of truth for which features are covered. The API also enforces these restri… authentication Claude Developer Platform · in the page manage-claude/authentication …a workspace omits the header, the API returns a 400 `invalid_request_error`: ```json JSON { "type": "error", "error": { "type": "invalid_request_error", "message": "anthropic-workspace-i… cmek Claude Developer Platform · in the page manage-claude/cmek …ailable](https://platform.claude.com/docs/en/manage-claude/compliance-errors#local-sessions-temporarily-unavailable) instead of transcript content. Session metadata is still listed. * Office agents. *… cmek-aws-kms Claude Developer Platform · in the page manage-claude/cmek-aws-kms …or attach it to a workspace. Each validation adds four access-denied errors to CloudTrail. These are expected. If you need to filter them out, filter on all three of the following values. The first o… cmek-azure-key-vault Claude Developer Platform · in the page manage-claude/cmek-azure-key-vault …nother integration), `az ad sp create` exits with an "already exists" error. Fetch its object ID instead: ```bash az ad sp show --id 8635ae1a-3e5d-44e8-a4ed-e0f614466f87 --query id -o tsv… cmek-google-cloud-kms Claude Developer Platform · in the page manage-claude/cmek-google-cloud-kms …print(f"status: {validation.status}") print(f"error: {validation.error}") ``` ```typescript TypeScript const client = new Anthropic()… Fetch the first page (newest activities first) and capture its trailing cursor. Claude Developer Platform · in the page manage-claude/compliance-activity-feed …urned page remains valid; a request that fails (5xx, timeout, network error) does not advance your position. Retry the same request with the same cursor. Only move to the next cursor after you have st… compliance-api Claude Developer Platform · in the page manage-claude/compliance-api …equests](https://platform.claude.com/docs/en/manage-claude/compliance-errors#429-too-many-requests) for the response headers and retry contract. *** ## Versioning Send the `anthropic-version` heade… compliance-api-access Claude Developer Platform · in the page manage-claude/compliance-api-access …rbidden](https://platform.claude.com/docs/en/manage-claude/compliance-errors#403-forbidden). For the same key's role in managing your Claude Console organization, see [Admin API](https://platform.cla… WARNING: This operation PERMANENTLY deletes the chat, all of its messages, Claude Developer Platform · in the page manage-claude/compliance-content-data …rbidden](https://platform.claude.com/docs/en/manage-claude/compliance-errors#403-forbidden). Endpoints on this page paginate two ways; see [Paginate results](https://platform.claude.com/docs/en/manag… compliance-faq Claude Developer Platform · in the page manage-claude/compliance-faq …ts returns the following response. ```json Response { "error": { "type": "permission_error", "message": "Missing required scopes. Got: ['api:admin', 'read:compliance_act… compliance-integration-patterns Claude Developer Platform · in the page manage-claude/compliance-integration-patterns …equests](https://platform.claude.com/docs/en/manage-claude/compliance-errors#429-too-many-requests) for the response headers and retry contract. | Pattern | Choose when… compliance-org-data Claude Developer Platform · in the page manage-claude/compliance-org-data …rbidden](https://platform.claude.com/docs/en/manage-claude/compliance-errors#403-forbidden). </Check> The endpoints on this page expose the directory side of a Claude Enterprise organization: its lin… compliance-sessions Claude Developer Platform · in the page manage-claude/compliance-sessions …rbidden](https://platform.claude.com/docs/en/manage-claude/compliance-errors#403-forbidden). The following table maps each product, and where it runs, to the endpoint family that returns its sessions… data-residency Claude Developer Platform · in the page manage-claude/data-residency …, Claude Sonnet 4.5, Claude Haiku 4.5, or earlier models return a 400 error. <Note> The `inference_geo` parameter is available on the Claude API (first-party) and [Claude Platform on AWS](https://p… inference-hooks Claude Developer Platform · in the page manage-claude/inference-hooks …conversation. If your AI security server is unreachable, returns an error, or doesn't respond within the timeout, your organization's failure handling setting decides the outcome: block the request,… inference-hooks-configuration Claude Developer Platform · in the page manage-claude/inference-hooks-configuration …| | Transport error | DNS resolution, the TLS handshake, or the connection failed.… inference-hooks-endpoint Claude Developer Platform · in the page manage-claude/inference-hooks-endpoint …re replaced by placeholder markers, and raw bytes are never sent. `is_error`: whether the tool call failed. `tool_name`: the tool's name, so a policy can condition on tool identity without cross-refer… rate-limits-api Claude Developer Platform · in the page manage-claude/rate-limits-api …the model string doesn't match any group, the endpoint returns a 404 error. The `model` parameter is supported on the organization endpoint only; the workspace endpoint doesn't accept it. ## Workspa… spend-limits-api Claude Developer Platform · in the page manage-claude/spend-limits-api …xt wrap user_ids[]=user_01AbCdEfGh&user_ids[]=user_01JkLmNoPq ``` ## Error responses Error responses follow the standard shape documented in [Errors](https://platform.claude.com/docs/en/api/errors).… user-management Claude Developer Platform · in the page manage-claude/user-management …vailability. Creating an invite when no seat is free fails with a 400 error rather than purchasing a seat. Withdrawing the invite, letting it expire, or removing the member later returns the seat to t… wif-admin-api Claude Developer Platform · in the page manage-claude/wif-admin-api …eference): environment variables, validation rules, OAuth scopes, and error codes * [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api): the rest of the organization management su… aws Claude Developer Platform · in the page manage-claude/wif-providers/aws …`'STS' object has no attribute 'get_web_identity_token'` or a similar error, pin your STS client to a region (for example, `boto3.client("sts", region_name="us-east-1")`) and ensure your AWS SDK is re… Create the app registration that represents the Claude API audience. Claude Developer Platform · in the page manage-claude/wif-providers/azure …gistration, token requests fail with a "resource not found in tenant" error (`AADSTS50001` from the managed identity endpoints, `AADSTS500011` from the Entra token endpoint). ```bash # Create the app… gcp Claude Developer Platform · in the page manage-claude/wif-providers/gcp …anthropic.com" googleIDToken := func(ctx context.Context) (string, error) { creds, err := idtoken.NewCredentials(&idtoken.Options{Audience: audience}) if err != nil { return "", err }… github-actions Claude Developer Platform · in the page manage-claude/wif-providers/github-actions …in seconds. A denied exchange returns an opaque `401` `authentication_error` with the fixed message `Authentication failed`, whichever check failed; in most cases the deny reason is recorded on the at… kubernetes Claude Developer Platform · in the page manage-claude/wif-providers/kubernetes …y during cluster upgrades), but token exchanges fail with a signature error until you push the new JWKS. </Warning> **Federation rule:** Match the service account's `sub` claim and the audience you s… okta Claude Developer Platform · in the page manage-claude/wif-providers/okta …k-go/option" ) func fetchOktaToken(ctx context.Context) (string, error) { form := url.Values{ "grant_type": {"client_credentials"}, "scope": {"anthropic.acce… Replace NODE_UID with the node's UID: Claude Developer Platform · in the page manage-claude/wif-providers/spiffe …ce.Close() fetchJWTSVID := func(ctx context.Context) (string, error) { svid, err := source.FetchJWTSVID(ctx, jwtsvid.Params{Audience: audience}) if err != nil { return… wif-reference Claude Developer Platform · in the page manage-claude/wif-reference …: Environment variables, validation rules, profile configuration, and error reference for Workload Identity Federation. --- This page collects the configuration surfaces, validation constraints, and… workload-identity-federation Claude Developer Platform · in the page manage-claude/workload-identity-federation …at expiry minus 30 seconds. A failed exchange at this point raises an error. The cached token is too close to expiry to be safe. Because the SDK re-reads `ANTHROPIC_IDENTITY_TOKEN_FILE` on every exch… workspaces Claude Developer Platform · in the page manage-claude/workspaces …when the request fails before authentication completes, such as a 401 error. The following examples send a Messages API request and print the workspace ID from the response headers: <CodeGroup> ``…
Feedback