Skip to main content

Overview

Registry errors are thrown by the FrontMCP registry system — the internal data structure that tracks tools, resources, prompts, flows, hooks, and other entries. All registry errors are internal errors.

Error Reference

RegistryDefinitionNotFoundError

Thrown when a registry definition is not found by its token.
PropertyTypeValue
codestringREGISTRY_DEFINITION_NOT_FOUND
statusCodenumber500
isPublicbooleanfalse
new RegistryDefinitionNotFoundError(registryName: string, tokenName: string)
Example:
import { RegistryDefinitionNotFoundError } from '@frontmcp/sdk';

throw new RegistryDefinitionNotFoundError('ToolRegistry', 'my_tool');
// "[ToolRegistry] Definition not found for token "my_tool""

RegistryGraphEntryNotFoundError

Thrown when a registry graph entry is not found by its token.
PropertyTypeValue
codestringREGISTRY_GRAPH_ENTRY_NOT_FOUND
statusCodenumber500
isPublicbooleanfalse
new RegistryGraphEntryNotFoundError(registryName: string, tokenName: string)

RegistryDependencyNotRegisteredError

Thrown when an entity references a dependency that is not registered.
PropertyTypeValue
codestringREGISTRY_DEPENDENCY_NOT_REGISTERED
statusCodenumber500
isPublicbooleanfalse
new RegistryDependencyNotRegisteredError(entityType: string, tokenName: string, depName: string)
Example:
import { RegistryDependencyNotRegisteredError } from '@frontmcp/sdk';

throw new RegistryDependencyNotRegisteredError('Tool', 'my_tool', 'DatabaseService');
// "Tool "my_tool" depends on "DatabaseService", which is not registered"

InvalidRegistryKindError

Thrown when a registry entry has an invalid or unsupported kind.
PropertyTypeValue
codestringINVALID_REGISTRY_KIND
statusCodenumber500
isPublicbooleanfalse
new InvalidRegistryKindError(entityType: string, kind?: string)

NameDisambiguationError

Thrown when name disambiguation exceeds the maximum number of attempts.
PropertyTypeValue
codestringNAME_DISAMBIGUATION_FAILED
statusCodenumber500
isPublicbooleanfalse
new NameDisambiguationError(candidate: string, maxAttempts: number)
Example:
import { NameDisambiguationError } from '@frontmcp/sdk';

throw new NameDisambiguationError('my_tool', 100);
// "Failed to disambiguate name "my_tool" after 100 attempts"

EntryValidationError

Thrown when a registry entry fails validation (e.g., missing a required property).
PropertyTypeValue
codestringENTRY_VALIDATION_FAILED
statusCodenumber500
isPublicbooleanfalse
new EntryValidationError(entryType: string, details: string)

FlowNotRegisteredError

Thrown when a flow is not found in the flow registry.
PropertyTypeValue
codestringFLOW_NOT_REGISTERED
statusCodenumber500
isPublicbooleanfalse
new FlowNotRegisteredError(flowName: string)
Example:
import { FlowNotRegisteredError } from '@frontmcp/sdk';

throw new FlowNotRegisteredError('tools:call-tool');
// "Flow "tools:call-tool" is not registered"

UnsupportedHookOwnerKindError

Thrown when a hook has an unsupported owner kind.
PropertyTypeValue
codestringUNSUPPORTED_HOOK_OWNER_KIND
statusCodenumber500
isPublicbooleanfalse
new UnsupportedHookOwnerKindError(kind: string)

InvalidHookFlowError

Thrown when a hook is registered with a flow that is not supported by the entry type (e.g., a tool hook on a resource class).
PropertyTypeValue
codestringINVALID_HOOK_FLOW
statusCodenumber500
isPublicbooleanfalse
new InvalidHookFlowError(message: string)
Example:
import { InvalidHookFlowError } from '@frontmcp/sdk';

throw new InvalidHookFlowError('Resource "MyResource" has hooks for unsupported flows: tools:call-tool');