Skip to main content

Overview

SDK errors cover a broad range of internal failures across the FrontMCP SDK — flow execution, server configuration, skill management, serverless handlers, Vercel KV, and more. Most are internal errors except MissingPromptArgumentError (documented under Validation Errors).

Flow Errors

FlowExitedWithoutOutputError

Thrown when a flow completes all stages without producing output.
PropertyTypeValue
codestringFLOW_EXITED_WITHOUT_OUTPUT
statusCodenumber500
isPublicbooleanfalse
new FlowExitedWithoutOutputError()

FlowInputMissingError

Thrown when a flow stage receives missing or undefined input.
PropertyTypeValue
codestringFLOW_INPUT_MISSING
statusCodenumber500
isPublicbooleanfalse
fieldstringThe missing field name
flowNamestring | undefinedThe flow that encountered the error
new FlowInputMissingError(field: string, flowName?: string)
Example:
import { FlowInputMissingError } from '@frontmcp/sdk';

throw new FlowInputMissingError('request', 'well-known.oauth');
// "Flow "well-known.oauth" is missing required input: "request""

Server & Configuration Errors

ServerNotFoundError

Thrown when no MCP server is found.
PropertyTypeValue
codestringSERVER_NOT_FOUND
statusCodenumber500
isPublicbooleanfalse
new ServerNotFoundError()

ConfigNotFoundError

Thrown when a configuration file is not found at the expected path.
PropertyTypeValue
codestringCONFIG_NOT_FOUND
statusCodenumber500
isPublicbooleanfalse
new ConfigNotFoundError(path: string, triedPaths?: string[])
Example:
import { ConfigNotFoundError } from '@frontmcp/sdk';

throw new ConfigNotFoundError('frontmcp.config.ts', ['./frontmcp.config.ts', './config/frontmcp.ts']);

ScopeConfigurationError

Thrown when the scope configuration is invalid.
PropertyTypeValue
codestringSCOPE_CONFIGURATION_ERROR
statusCodenumber500
isPublicbooleanfalse
new ScopeConfigurationError(message: string)

RequiredConfigUndefinedError

Thrown when a required configuration value is undefined.
PropertyTypeValue
codestringREQUIRED_CONFIG_UNDEFINED
statusCodenumber500
isPublicbooleanfalse
new RequiredConfigUndefinedError(path: string)
Example:
import { RequiredConfigUndefinedError } from '@frontmcp/sdk';

throw new RequiredConfigUndefinedError('auth.secret');
// "Required configuration path "auth.secret" is undefined"

Session & Auth Errors

SessionVerificationFailedError

Thrown when session verification fails.
PropertyTypeValue
codestringSESSION_VERIFICATION_FAILED
statusCodenumber500
isPublicbooleanfalse
new SessionVerificationFailedError()

Context Errors

ContextExtensionNotAvailableError

Thrown when a context extension (e.g., this.remember) is not available, typically because the required plugin is not installed.
PropertyTypeValue
codestringCONTEXT_EXTENSION_NOT_AVAILABLE
statusCodenumber500
isPublicbooleanfalse
originalErrorError | undefinedThe underlying cause
new ContextExtensionNotAvailableError(message: string, cause?: Error)

InvokeStateMissingKeyError

Thrown when an invoke state key is missing during flow execution.
PropertyTypeValue
codestringINVOKE_STATE_MISSING_KEY
statusCodenumber500
isPublicbooleanfalse
new InvokeStateMissingKeyError(key: string)

Skill Errors

SkillSessionError

Thrown when a skill session operation fails.
PropertyTypeValue
codestringSKILL_SESSION_ERROR
statusCodenumber500
isPublicbooleanfalse
new SkillSessionError(operation: string, reason: string)

InvalidSkillError

Thrown when a skill definition is invalid.
PropertyTypeValue
codestringINVALID_SKILL
statusCodenumber500
isPublicbooleanfalse
new InvalidSkillError(name: string, details: string)

SkillInstructionFetchError

Thrown when fetching remote skill instructions fails.
PropertyTypeValue
codestringSKILL_INSTRUCTION_FETCH_FAILED
statusCodenumber500
isPublicbooleanfalse
new SkillInstructionFetchError(url: string, status: number, statusText: string)

InvalidInstructionSourceError

Thrown when an instruction source is invalid.
PropertyTypeValue
codestringINVALID_INSTRUCTION_SOURCE
statusCodenumber500
isPublicbooleanfalse
new InvalidInstructionSourceError()

Serverless Errors

ServerlessHandlerNotInitializedError

Thrown when a serverless handler is accessed before initialization.
PropertyTypeValue
codestringSERVERLESS_HANDLER_NOT_INITIALIZED
statusCodenumber500
isPublicbooleanfalse
new ServerlessHandlerNotInitializedError()

Adapter Errors

DynamicAdapterNameError

Thrown when a dynamic adapter has a name conflict.
PropertyTypeValue
codestringDYNAMIC_ADAPTER_NAME_ERROR
statusCodenumber500
isPublicbooleanfalse
new DynamicAdapterNameError(message: string)

Agent SDK Errors

AgentConfigKeyNotFoundError

Thrown when an agent configuration key is not found.
PropertyTypeValue
codestringAGENT_CONFIG_KEY_NOT_FOUND
statusCodenumber500
isPublicbooleanfalse
new AgentConfigKeyNotFoundError(path: string)

AgentToolExecutionError

Thrown when an agent’s tool execution fails.
PropertyTypeValue
codestringAGENT_TOOL_EXECUTION_ERROR
statusCodenumber500
isPublicbooleanfalse
new AgentToolExecutionError(message: string)

AgentMethodNotAvailableError

Thrown when an agent method is not available.
PropertyTypeValue
codestringAGENT_METHOD_NOT_AVAILABLE
statusCodenumber500
isPublicbooleanfalse
new AgentMethodNotAvailableError(method: string, name: string)

Internal Utility Errors

DependencyNotFoundError

Thrown when a required dependency is not found in a registry during initialization.
PropertyTypeValue
codestringDEPENDENCY_NOT_FOUND
statusCodenumber500
isPublicbooleanfalse
new DependencyNotFoundError(registryName: string, dependencyName: string)
Example:
import { DependencyNotFoundError } from '@frontmcp/sdk';

throw new DependencyNotFoundError('AuthRegistry', 'SessionStore');
// "Dependency "SessionStore" not found in AuthRegistry"

GenericServerError

A general-purpose internal error wrapper. Used by toMcpError() to wrap unknown errors.
PropertyTypeValue
codestringSERVER_ERROR
statusCodenumber500
isPublicbooleanfalse
originalErrorError | undefinedThe underlying cause
new GenericServerError(message: string, originalError?: Error)

GlobalConfigNotFoundError

Thrown when a plugin requires global configuration that is not defined in the @FrontMcp decorator.
PropertyTypeValue
codestringGLOBAL_CONFIG_NOT_FOUND
statusCodenumber500
isPublicbooleantrue
pluginNamestringThe plugin that requires config
configKeystringThe missing config key
new GlobalConfigNotFoundError(pluginName: string, configKey: string)
Example:
import { GlobalConfigNotFoundError } from '@frontmcp/sdk';

throw new GlobalConfigNotFoundError('RememberPlugin', 'redis');
// 'Plugin "RememberPlugin" requires global "redis" configuration. Add "redis" to your @FrontMcp decorator options.'

RequestContextNotAvailableError

Thrown when code attempts to access RequestContext outside a request scope (without AsyncLocalStorage context).
PropertyTypeValue
codestringREQUEST_CONTEXT_NOT_AVAILABLE
statusCodenumber500
isPublicbooleanfalse
new RequestContextNotAvailableError(message?: string)

Vercel KV Errors

VercelKvNotSupportedError

Thrown when Vercel KV does not support a requested feature.
PropertyTypeValue
codestringVERCEL_KV_NOT_SUPPORTED
statusCodenumber500
isPublicbooleanfalse
new VercelKvNotSupportedError(feature: string)

VercelKvAsyncInitRequiredError

Thrown when Vercel KV is used before async initialization.
PropertyTypeValue
codestringVERCEL_KV_ASYNC_INIT_REQUIRED
statusCodenumber500
isPublicbooleanfalse
new VercelKvAsyncInitRequiredError(message?: string)