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
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmith_openapi_client_exceptionsAPIError
Classā—Since v0.8

APIError

Copy
APIError(
  self,
  message: str,
  request: httpx.Request,
  *,
  body: object | None

Bases

LangsmithError

Constructors

Attributes

View source on GitHub
)
constructor
__init__
NameType
messagestr
requesthttpx.Request
bodyobject | None
attribute
message: str
attribute
request: httpx.Request
attribute
body: object | None

The API response body.

If the API responded with a valid JSON structure then this property will be the decoded result.

If it isn't a valid JSON structure then this will be the raw response.

If there was no response associated with this error then it will be None.