LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
Pythonlangsmithsandbox_helpershandle_sandbox_creation_error
Function●Since v0.6

handle_sandbox_creation_error

Handle HTTP errors specific to sandbox creation.

Maps API error responses to specific exception types:

  • 408: ResourceTimeoutError (sandbox didn't become ready in time)
  • 422: ValidationError (bad input) or SandboxCreationError (runtime)
  • 429: QuotaExceededError (org limits exceeded)
  • 503: SandboxCreationError (no resources available)
  • Other: Falls through to generic error handling
Copy
handle_sandbox_creation_error(
    error: httpx.HTTPStatusError,
) -> None
View source on GitHub