Search the documentation
50 pages for onerror.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it. Cut at 50, so a narrower query shows the rest.
PDF Processing
Claude Developer Platform · in the page
agents-and-tools/agent-skills/best-practices
…") as f: f.write("") return "" except PermissionError: # Provide alternative instead of failing print(f"Cannot access {path}, using default") return ""…
handle-tool-calls
Claude Developer Platform · in the page
agents-and-tools/tool-use/handle-tool-calls
…e_id": "toolu_01A09q90qw90lq917835lq9", "content": "ConnectionError: the weather service API is not available (HTTP 500)", "is_error": true } ] } ``` Cla…
Beta
Claude Developer Platform · in the page
api/beta
…default: api_error ### Beta Authentication Error - `BetaAuthenticationError object` - `message: string` default: Authentication error - `type: "authentication_error"` default: authen…
Deployments
Claude Developer Platform · in the page
api/beta/deployments
…the deployment. - `error: BetaManagedAgentsDeploymentPausedReasonError` The error that triggered an auto-pause. Matches the failed run's `error.type`. - `BetaManagedAgentsEnvi…
Archive Deployment
Claude Developer Platform · in the page
api/beta/deployments/archive
…the deployment. - `error: BetaManagedAgentsDeploymentPausedReasonError` The error that triggered an auto-pause. Matches the failed run's `error.type`. - `BetaManagedAgentsEnvi…
Create Deployment
Claude Developer Platform · in the page
api/beta/deployments/create
…the deployment. - `error: BetaManagedAgentsDeploymentPausedReasonError` The error that triggered an auto-pause. Matches the failed run's `error.type`. - `BetaManagedAgentsEnvi…
List Deployments
Claude Developer Platform · in the page
api/beta/deployments/list
…the deployment. - `error: BetaManagedAgentsDeploymentPausedReasonError` The error that triggered an auto-pause. Matches the failed run's `error.type`. - `BetaManagedAgentsEnvi…
Pause Deployment
Claude Developer Platform · in the page
api/beta/deployments/pause
…the deployment. - `error: BetaManagedAgentsDeploymentPausedReasonError` The error that triggered an auto-pause. Matches the failed run's `error.type`. - `BetaManagedAgentsEnvi…
Get Deployment
Claude Developer Platform · in the page
api/beta/deployments/retrieve
…the deployment. - `error: BetaManagedAgentsDeploymentPausedReasonError` The error that triggered an auto-pause. Matches the failed run's `error.type`. - `BetaManagedAgentsEnvi…
Unpause Deployment
Claude Developer Platform · in the page
api/beta/deployments/unpause
…the deployment. - `error: BetaManagedAgentsDeploymentPausedReasonError` The error that triggered an auto-pause. Matches the failed run's `error.type`. - `BetaManagedAgentsEnvi…
Update Deployment
Claude Developer Platform · in the page
api/beta/deployments/update
…the deployment. - `error: BetaManagedAgentsDeploymentPausedReasonError` The error that triggered an auto-pause. Matches the failed run's `error.type`. - `BetaManagedAgentsEnvi…
Memories
Claude Developer Platform · in the page
api/beta/memory_stores/memories
…`BetaManagedAgentsError = BetaInvalidRequestError or BetaAuthenticationError or BetaBillingError or 9 more` - `BetaInvalidRequestError object` - `message: string` default: Invalid requ…
Batches
Claude Developer Platform · in the page
api/beta/messages/batches
…default: invalid_request_error - `BetaAuthenticationError object` - `message: string` default: Authentication error - `type: "authenticatio…
Retrieve Message Batch results
Claude Developer Platform · in the page
api/beta/messages/batches/results
…default: invalid_request_error - `BetaAuthenticationError object` - `message: string` default: Authentication error - `type: "authenticatio…
Events
Claude Developer Platform · in the page
api/beta/sessions/events
…`type: "agent.thread_context_compacted"` - `BetaManagedAgentsSessionErrorEvent object` An error event indicating a problem occurred during session execution. - `id: string` Unique…
List Events
Claude Developer Platform · in the page
api/beta/sessions/events/list
…`type: "agent.thread_context_compacted"` - `BetaManagedAgentsSessionErrorEvent object` An error event indicating a problem occurred during session execution. - `id: string` Unique…
Stream Events
Claude Developer Platform · in the page
api/beta/sessions/events/stream
…`type: "agent.thread_context_compacted"` - `BetaManagedAgentsSessionErrorEvent object` An error event indicating a problem occurred during session execution. - `id: string` Unique…
Threads
Claude Developer Platform · in the page
api/beta/sessions/threads
…`type: "agent.thread_context_compacted"` - `BetaManagedAgentsSessionErrorEvent object` An error event indicating a problem occurred during session execution. - `id: string` Unique…
Events
Claude Developer Platform · in the page
api/beta/sessions/threads/events
…`type: "agent.thread_context_compacted"` - `BetaManagedAgentsSessionErrorEvent object` An error event indicating a problem occurred during session execution. - `id: string` Unique…
List Session Thread Events
Claude Developer Platform · in the page
api/beta/sessions/threads/events/list
…`type: "agent.thread_context_compacted"` - `BetaManagedAgentsSessionErrorEvent object` An error event indicating a problem occurred during session execution. - `id: string` Unique…
Stream Session Thread Events
Claude Developer Platform · in the page
api/beta/sessions/threads/events/stream
…`type: "agent.thread_context_compacted"` - `BetaManagedAgentsSessionErrorEvent object` An error event indicating a problem occurred during session execution. - `id: string` Unique…
Batches
Claude Developer Platform · in the page
api/messages/batches
…default: invalid_request_error - `AuthenticationError object` - `message: string` default: Authentication error - `type: "authenticatio…
Retrieve Message Batch results
Claude Developer Platform · in the page
api/messages/batches/results
…default: invalid_request_error - `AuthenticationError object` - `message: string` default: Authentication error - `type: "authenticatio…
fast-mode
Claude Developer Platform · in the page
build-with-claude/fast-mode
…( anthropic.APIStatusError, anthropic.APIConnectionError, ) as error: if isinstance(error, anthropic.APIStatusError) and error.status_code < 500: rai…
API usage primer for Claude
Claude Developer Platform · in the page
claude_api_primer
…l_use_id": "toolu_01A09q90qw90lq917835lq9", "content": "ConnectionError: the weather service API is not available (HTTP 500)", "is_error": true } ] } ``` ### Invalid tool name If C…
For Amazon Bedrock support
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/python
…], model="claude-opus-5", ) except anthropic.APIConnectionError as e: print("The server could not be reached") print(e.__cause__) # an underlying Exception, likely raised within…
Automatically handles tool execution loop
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/ruby
…model: :"claude-opus-5" ) rescue Anthropic::Errors::APIConnectionError => e puts("The server could not be reached") puts(e.cause) # an underlying Exception, likely raised within `net/http`…
typescript
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/typescript
…0 | `BadRequestError` | | 401 | `AuthenticationError` | | 403 | `PermissionDeniedError` | | 404 | `NotFoundError` | | 409 | `Conflic…
events-and-streaming
Claude Developer Platform · in the page
managed-agents/events-and-streaming
…} else if (streamEvent.Value is BetaManagedAgentsSessionErrorEvent error) { Console.WriteLine($"\n[Error: {error.Error?.Message ?? "unknown"}]");…
spawn.sh: called once per claimed work item
Claude Developer Platform · in the page
managed-agents/self-hosted-sandboxes
…aders=headers) except standardwebhooks.WebhookVerificationError: return {"error": "signature verification failed"}, 401 if event.data.type != "session.sta…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…not found. ```python theme={null} class CLINotFoundError(CLIConnectionError): def __init__( self, message: str = "Claude Code not found", cli_path: str | None = None ): """…
Troubleshooting
Claude Code CLI · in the page
agent-sdk/troubleshooting
…a service manager, often run with a different `PATH`. ### CLIConnectionError: Refusing to execute batch script On Windows, connecting fails with a `CLIConnectionError` when the CLI path the Python S…
Deploy Claude apps gateway on AWS
Claude Code CLI · in the page
claude-apps-gateway-on-aws
…| | ECS task stops with `ResourceInitializationError` before the gateway logs anything | The execution role can't read…
Extend Claude with skills
Claude Code CLI · in the page
skills
…result["size"] += child["size"] except PermissionError: pass return result def generate_html(data: dict, stats: dict, output: Path) -> None: ext_sizes = stats["…
Build an MCP client
Model Context Protocol · in the page
docs/2024-11-05/develop/build-client
…d environment variables are set * `Anthropic::Errors::AuthenticationError`: Check your `.env` file has a valid `ANTHROPIC_API_KEY` </Tab> <Tab title="Rust"> [You can find the complete cod…
Build an MCP client
Model Context Protocol · in the page
docs/2025-03-26/develop/build-client
…d environment variables are set * `Anthropic::Errors::AuthenticationError`: Check your `.env` file has a valid `ANTHROPIC_API_KEY` </Tab> <Tab title="Rust"> [You can find the complete cod…
Build an MCP client
Model Context Protocol · in the page
docs/2025-06-18/develop/build-client
…d environment variables are set * `Anthropic::Errors::AuthenticationError`: Check your `.env` file has a valid `ANTHROPIC_API_KEY` </Tab> <Tab title="Rust"> [You can find the complete cod…
Build an MCP client
Model Context Protocol · in the page
docs/2025-11-25/develop/build-client
…d environment variables are set * `Anthropic::Errors::AuthenticationError`: Check your `.env` file has a valid `ANTHROPIC_API_KEY` </Tab> <Tab title="Rust"> [You can find the complete cod…
Build an MCP client
Model Context Protocol · in the page
docs/2026-07-28/develop/build-client
…d environment variables are set * `Anthropic::Errors::AuthenticationError`: Check your `.env` file has a valid `ANTHROPIC_API_KEY` </Tab> <Tab title="Rust"> [You can find the complete cod…
Architecture overview
Model Context Protocol · in the page
docs/2026-07-28/learn/architecture
…sted version, it rejects the request with an `UnsupportedProtocolVersionError` listing the versions it does support, and the client retries with a mutually supported version. 2. **Capability Disc…
Versioning
Model Context Protocol · in the page
docs/2026-07-28/learn/versioning
…the requested version, it responds with an [`UnsupportedProtocolVersionError`](/specification/2026-07-28/basic/versioning#protocol-version-negotiation) listing the versions it does support. The clien…
Debugging
Model Context Protocol · in the page
docs/2026-07-28/tools/debugging
…protocol versions the server supports. An `UnsupportedProtocolVersionError` (`-32022`) lists the server's supported versions in its `data` field 5. Check the [per-request `_meta` fields](/spe…
Understanding Authorization in MCP
Model Context Protocol · in the page
docs/2026-07-28/tutorials/security/authorization
…list straight in raises a pydantic # ValidationError that the broad `except` below turns into a # silent 401. We already confirmed this server's resour…
Build an MCP client
Model Context Protocol · in the page
docs/draft/develop/build-client
…d environment variables are set * `Anthropic::Errors::AuthenticationError`: Check your `.env` file has a valid `ANTHROPIC_API_KEY` </Tab> <Tab title="Rust"> [You can find the complete cod…
Architecture overview
Model Context Protocol · in the page
docs/draft/learn/architecture
…sted version, it rejects the request with an `UnsupportedProtocolVersionError` listing the versions it does support, and the client retries with a mutually supported version. 2. **Capability Disc…
Versioning
Model Context Protocol · in the page
docs/draft/learn/versioning
…the requested version, it responds with an [`UnsupportedProtocolVersionError`](/specification/draft/basic/versioning#protocol-version-negotiation) listing the versions it does support. The client can…
Debugging
Model Context Protocol · in the page
docs/draft/tools/debugging
…protocol versions the server supports. An `UnsupportedProtocolVersionError` (`-32022`) lists the server's supported versions in its `data` field 5. Check the [per-request `_meta` fields](/spe…
Understanding Authorization in MCP
Model Context Protocol · in the page
docs/draft/tutorials/security/authorization
…list straight in raises a pydantic # ValidationError that the broad `except` below turns into a # silent 401. We already confirmed this server's resour…
SEP-2575: Make MCP Stateless
Model Context Protocol · in the page
seps/2575-stateless-mcp
…_PROTOCOL_VERSION = -32022; export interface UnsupportedProtocolVersionError extends Omit< JSONRPCErrorResponse, "error" > { error: Error & { code: typeof UNSUPPORTED_PROTOCOL_VERSION;…
Overview
Model Context Protocol · in the page
specification/2026-07-28/basic/index
…colVersion`](/specification/2026-07-28/schema#unsupportedprotocolversionerror) | Codes defined by earlier protocol versions remain reserved and will not be reused. Implementations of this p…