---
title: "Registry Errors"
description: "Errors for registry lookups, dependency resolution, and entry validation."
icon: "database"
keywords: ['frontmcp', 'mcp', 'model context protocol', 'sdk', 'reference', 'api', 'errors', 'exceptions', 'error handling', 'registry', 'typescript']
---

## 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.

| Property     | Type      | Value                           |
| ------------ | --------- | ------------------------------- |
| `code`       | `string`  | `REGISTRY_DEFINITION_NOT_FOUND` |
| `statusCode` | `number`  | `500`                           |
| `isPublic`   | `boolean` | `false`                         |

```typescript
new RegistryDefinitionNotFoundError(registryName: string, tokenName: string)
```

**Example:**

```typescript
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.

| Property     | Type      | Value                            |
| ------------ | --------- | -------------------------------- |
| `code`       | `string`  | `REGISTRY_GRAPH_ENTRY_NOT_FOUND` |
| `statusCode` | `number`  | `500`                            |
| `isPublic`   | `boolean` | `false`                          |

```typescript
new RegistryGraphEntryNotFoundError(registryName: string, tokenName: string)
```

---

### RegistryDependencyNotRegisteredError

Thrown when an entity references a dependency that is not registered.

| Property     | Type      | Value                                |
| ------------ | --------- | ------------------------------------ |
| `code`       | `string`  | `REGISTRY_DEPENDENCY_NOT_REGISTERED` |
| `statusCode` | `number`  | `500`                                |
| `isPublic`   | `boolean` | `false`                              |

```typescript
new RegistryDependencyNotRegisteredError(entityType: string, tokenName: string, depName: string)
```

**Example:**

```typescript
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.

| Property     | Type      | Value                   |
| ------------ | --------- | ----------------------- |
| `code`       | `string`  | `INVALID_REGISTRY_KIND` |
| `statusCode` | `number`  | `500`                   |
| `isPublic`   | `boolean` | `false`                 |

```typescript
new InvalidRegistryKindError(entityType: string, kind?: string)
```

---

### NameDisambiguationError

Thrown when name disambiguation exceeds the maximum number of attempts.

| Property     | Type      | Value                        |
| ------------ | --------- | ---------------------------- |
| `code`       | `string`  | `NAME_DISAMBIGUATION_FAILED` |
| `statusCode` | `number`  | `500`                        |
| `isPublic`   | `boolean` | `false`                      |

```typescript
new NameDisambiguationError(candidate: string, maxAttempts: number)
```

**Example:**

```typescript
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).

| Property     | Type      | Value                     |
| ------------ | --------- | ------------------------- |
| `code`       | `string`  | `ENTRY_VALIDATION_FAILED` |
| `statusCode` | `number`  | `500`                     |
| `isPublic`   | `boolean` | `false`                   |

```typescript
new EntryValidationError(entryType: string, details: string)
```

---

### FlowNotRegisteredError

Thrown when a flow is not found in the flow registry.

| Property     | Type      | Value                 |
| ------------ | --------- | --------------------- |
| `code`       | `string`  | `FLOW_NOT_REGISTERED` |
| `statusCode` | `number`  | `500`                 |
| `isPublic`   | `boolean` | `false`               |

```typescript
new FlowNotRegisteredError(flowName: string)
```

**Example:**

```typescript
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.

| Property     | Type      | Value                         |
| ------------ | --------- | ----------------------------- |
| `code`       | `string`  | `UNSUPPORTED_HOOK_OWNER_KIND` |
| `statusCode` | `number`  | `500`                         |
| `isPublic`   | `boolean` | `false`                       |

```typescript
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).

| Property     | Type      | Value               |
| ------------ | --------- | ------------------- |
| `code`       | `string`  | `INVALID_HOOK_FLOW` |
| `statusCode` | `number`  | `500`               |
| `isPublic`   | `boolean` | `false`             |

```typescript
new InvalidHookFlowError(message: string)
```

**Example:**

```typescript
import { InvalidHookFlowError } from '@frontmcp/sdk';

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