Skip to main content

Overview

Auth internal errors are thrown by the authentication infrastructure — encryption contexts, credential vaults, token stores, session management, and provider registration. All are internal errors that should never be exposed to clients. For public-facing auth errors, see Auth Errors.

Encryption Errors

EncryptionContextNotSetError

Thrown when the encryption context is not set before an operation that requires it.
PropertyTypeValue
codestringENCRYPTION_CONTEXT_NOT_SET
statusCodenumber500
isPublicbooleanfalse
new EncryptionContextNotSetError()

EncryptionKeyNotConfiguredError

Thrown when the encryption key is not configured.
PropertyTypeValue
codestringENCRYPTION_KEY_NOT_CONFIGURED
statusCodenumber500
isPublicbooleanfalse
new EncryptionKeyNotConfiguredError()

Vault Errors

VaultLoadError

Thrown when loading a credential vault fails.
PropertyTypeValue
codestringVAULT_LOAD_ERROR
statusCodenumber500
isPublicbooleanfalse
originalErrorError | undefinedThe underlying cause
new VaultLoadError(vaultId: string, originalError?: Error)
Example:
import { VaultLoadError } from '@frontmcp/sdk';

throw new VaultLoadError('user_123', new Error('Redis connection timeout'));
// "Failed to load vault "user_123": Redis connection timeout"

VaultNotFoundError

Thrown when a vault entity is not found.
PropertyTypeValue
codestringVAULT_NOT_FOUND
statusCodenumber500
isPublicbooleanfalse
new VaultNotFoundError(entityType: string, id: string)
Example:
import { VaultNotFoundError } from '@frontmcp/sdk';

throw new VaultNotFoundError('credential', 'slack_oauth');
// "credential "slack_oauth" not found in vault"

Token Errors

TokenNotAvailableError

Thrown when a token is not available (e.g., expired or not yet obtained).
PropertyTypeValue
codestringTOKEN_NOT_AVAILABLE
statusCodenumber500
isPublicbooleanfalse
new TokenNotAvailableError(message: string)

TokenStoreRequiredError

Thrown when a token store is required but not configured.
PropertyTypeValue
codestringTOKEN_STORE_REQUIRED
statusCodenumber500
isPublicbooleanfalse
new TokenStoreRequiredError(context: string)
Example:
import { TokenStoreRequiredError } from '@frontmcp/sdk';

throw new TokenStoreRequiredError('orchestrated auth');
// "Token store is required for orchestrated auth"

TokenLeakDetectedError

Thrown when a potential token leak is detected (e.g., token appearing in logs or responses).
PropertyTypeValue
codestringTOKEN_LEAK_DETECTED
statusCodenumber500
isPublicbooleanfalse
new TokenLeakDetectedError(detail: string)

Provider & Registration Errors

NoProviderIdError

Thrown when no provider ID is available during auth flow.
PropertyTypeValue
codestringNO_PROVIDER_ID
statusCodenumber500
isPublicbooleanfalse
new NoProviderIdError(message: string)

CredentialProviderAlreadyRegisteredError

Thrown when attempting to register a credential provider that is already registered.
PropertyTypeValue
codestringCREDENTIAL_PROVIDER_ALREADY_REGISTERED
statusCodenumber500
isPublicbooleanfalse
new CredentialProviderAlreadyRegisteredError(name: string)

AuthProvidersNotConfiguredError

Thrown when auth providers are not configured.
PropertyTypeValue
codestringAUTH_PROVIDERS_NOT_CONFIGURED
statusCodenumber500
isPublicbooleanfalse
new AuthProvidersNotConfiguredError()

OrchestratedAuthNotAvailableError

Thrown when orchestrated auth is not available in the current context.
PropertyTypeValue
codestringORCHESTRATED_AUTH_NOT_AVAILABLE
statusCodenumber500
isPublicbooleanfalse
new OrchestratedAuthNotAvailableError()

Session Errors

SessionSecretRequiredError

Thrown when a session secret is required but not configured.
PropertyTypeValue
codestringSESSION_SECRET_REQUIRED
statusCodenumber500
isPublicbooleanfalse
new SessionSecretRequiredError(component: string)
Example:
import { SessionSecretRequiredError } from '@frontmcp/sdk';

throw new SessionSecretRequiredError('session encryption');
// "Session secret is required for session encryption"

SessionIdEmptyError

Thrown when a session ID is empty.
PropertyTypeValue
codestringSESSION_ID_EMPTY
statusCodenumber500
isPublicbooleanfalse
new SessionIdEmptyError(storeName: string)

ElicitationSecretRequiredError

Thrown when the elicitation secret is required but not configured.
PropertyTypeValue
codestringELICITATION_SECRET_REQUIRED
statusCodenumber500
isPublicbooleanfalse
new ElicitationSecretRequiredError()

Scope & Access Errors

ScopeDeniedError

Thrown when scope access is denied for a provider.
PropertyTypeValue
codestringSCOPE_DENIED
statusCodenumber500
isPublicbooleanfalse
new ScopeDeniedError(providerId: string)

InMemoryStoreRequiredError

Thrown when an in-memory store is required but not available.
PropertyTypeValue
codestringINMEMORY_STORE_REQUIRED
statusCodenumber500
isPublicbooleanfalse
new InMemoryStoreRequiredError(component: string)

OrchestratorJwksNotAvailableError

Thrown when the orchestrator JWKS endpoint is not available.
PropertyTypeValue
codestringORCHESTRATOR_JWKS_NOT_AVAILABLE
statusCodenumber500
isPublicbooleanfalse
new OrchestratorJwksNotAvailableError()