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

parse_validation_error

Parse Pydantic validation error response.

Returns a list of validation error details, each containing:

  • loc: Location of the error (e.g., ["body", "resources", "cpu"])
  • msg: Human-readable error message
  • type: Error type (e.g., "value_error")
Copy
parse_validation_error(
    error: httpx.HTTPStatusError,
) -> list[dict]
View source on GitHub