LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Configuration
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsConfigurationTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsindexConfigurationError
Class●Since v1.8

ConfigurationError

Copy
class ConfigurationError

Bases

Error

Constructors

Properties

Methods

View source on GitHub

Example

constructor
constructor
property
[CONFIGURATION_ERROR_SYMBOL]: true
property
cause: Error
property
code: "TOOL_NAME_COLLISION"
property
message: string
property
name: string
property
stack: string
property
stackTraceLimit: number
method
captureStackTrace
method
isInstance→ error is ConfigurationError
method
prepareStackTrace

Thrown when createDeepAgent receives invalid configuration.

Follows the same pattern as SandboxError: a human-readable message, a structured code for programmatic handling, and a static isInstance guard that works across realms.

Copy
try {
  createDeepAgent({ tools: [myTool] });
} catch (error) {
  if (ConfigurationError.isInstance(error)) {
    switch (error.code) {
      case "TOOL_NAME_COLLISION":
        console.error("Rename your tool:", error.message);
        break;
    }
  }
}