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_helpersparse_error_response
Function●Since v0.6

parse_error_response

Parse standardized error response.

Expected format: {"detail": {"error": "...", "message": "..."}}

Returns a dict with:

  • error_type: The error type (e.g., "ImagePull", "CrashLoop")
  • message: Human-readable error message
Copy
parse_error_response(
    error: httpx.HTTPStatusError,
) -> dict[str, Any]
View source on GitHub