Documentation Index
Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Normalization errors are thrown during the normalization phase when provider or entity definitions have invalid shapes. This phase converts raw decorator metadata into normalized internal records. All normalization errors are internal errors.
Error Reference
MissingProvideError
Thrown when a provider/entity definition is missing the provide token.
| Property | Type | Value |
|---|
code | string | MISSING_PROVIDE |
statusCode | number | 500 |
isPublic | boolean | false |
new MissingProvideError(entityType: string, name: string)
Example:
import { MissingProvideError } from '@frontmcp/sdk';
throw new MissingProvideError('Provider', 'DatabaseService');
// "Provider 'DatabaseService' is missing 'provide'."
InvalidUseClassError
Thrown when useClass on a provider/entity is not a valid class (constructor function).
| Property | Type | Value |
|---|
code | string | INVALID_USE_CLASS |
statusCode | number | 500 |
isPublic | boolean | false |
new InvalidUseClassError(entityType: string, tokenName: string)
Example:
import { InvalidUseClassError } from '@frontmcp/sdk';
throw new InvalidUseClassError('Provider', 'DatabaseService');
// "'useClass' on Provider 'DatabaseService' must be a class."
InvalidUseFactoryError
Thrown when useFactory on a provider/entity is not a function.
| Property | Type | Value |
|---|
code | string | INVALID_USE_FACTORY |
statusCode | number | 500 |
isPublic | boolean | false |
new InvalidUseFactoryError(entityType: string, tokenName: string)
Example:
import { InvalidUseFactoryError } from '@frontmcp/sdk';
throw new InvalidUseFactoryError('Provider', 'ConfigService');
// "'useFactory' on Provider 'ConfigService' must be a function."
InvalidUseValueError
Thrown when useValue on a provider/entity is undefined.
| Property | Type | Value |
|---|
code | string | INVALID_USE_VALUE |
statusCode | number | 500 |
isPublic | boolean | false |
new InvalidUseValueError(entityType: string, tokenName: string)
Example:
import { InvalidUseValueError } from '@frontmcp/sdk';
throw new InvalidUseValueError('Provider', 'API_KEY');
// "'useValue' on Provider 'API_KEY' must be defined."
InvalidEntityError
Thrown when an entity (tool, resource, adapter, etc.) has an invalid shape.
| Property | Type | Value |
|---|
code | string | INVALID_ENTITY |
statusCode | number | 500 |
isPublic | boolean | false |
new InvalidEntityError(entityType: string, name: string, expected: string)
Example:
import { InvalidEntityError } from '@frontmcp/sdk';
throw new InvalidEntityError('Tool', 'my_tool', 'a class extending ToolContext');
// "Invalid Tool 'my_tool'. Expected a class extending ToolContext."