Skip to main content

Overview

Remote errors are thrown when interacting with remote MCP servers via the @App() decorator’s remote app configuration. They cover connection failures, timeouts, not-found resources, auth issues, execution failures, transport problems, capability mismatches, configuration errors, and retry validation.

Connection Errors

RemoteConnectionError

Thrown when the initial connection to a remote MCP server fails.
PropertyTypeValue
codestringREMOTE_CONNECTION_ERROR
statusCodenumber500
isPublicbooleanfalse
appIdstringRemote app identifier
urlstringTarget URL
originalErrorError | undefinedThe underlying cause
new RemoteConnectionError(appId: string, url: string, originalError?: Error)

RemoteDisconnectError

Thrown when a remote MCP server disconnects unexpectedly.
PropertyTypeValue
codestringREMOTE_DISCONNECT_ERROR
statusCodenumber500
isPublicbooleanfalse
appIdstringRemote app identifier
reasonstring | undefinedDisconnect reason
new RemoteDisconnectError(appId: string, reason?: string)

Timeout Errors

RemoteTimeoutError

Thrown when a remote MCP operation exceeds the configured timeout.
PropertyTypeValue
codestringREMOTE_TIMEOUT_ERROR
statusCodenumber504
isPublicbooleantrue
appIdstringRemote app identifier
operationstringThe operation that timed out
timeoutMsnumberConfigured timeout
mcpErrorCodenumber-32603
new RemoteTimeoutError(appId: string, operation: string, timeoutMs: number)
Example:
import { RemoteTimeoutError } from '@frontmcp/sdk';

throw new RemoteTimeoutError('slack', 'tools/call', 30000);

Not Found Errors

RemoteToolNotFoundError

Thrown when a tool is not found on the remote server.
PropertyTypeValue
codestringREMOTE_TOOL_NOT_FOUND
statusCodenumber404
isPublicbooleantrue
appIdstringRemote app identifier
toolNamestringThe missing tool
mcpErrorCodenumber-32601
new RemoteToolNotFoundError(appId: string, toolName: string)

RemoteResourceNotFoundError

Thrown when a resource is not found on the remote server.
PropertyTypeValue
codestringREMOTE_RESOURCE_NOT_FOUND
statusCodenumber404
isPublicbooleantrue
appIdstringRemote app identifier
uristringThe missing resource URI
mcpErrorCodenumber-32002
new RemoteResourceNotFoundError(appId: string, uri: string)

RemotePromptNotFoundError

Thrown when a prompt is not found on the remote server.
PropertyTypeValue
codestringREMOTE_PROMPT_NOT_FOUND
statusCodenumber404
isPublicbooleantrue
appIdstringRemote app identifier
promptNamestringThe missing prompt
mcpErrorCodenumber-32601
new RemotePromptNotFoundError(appId: string, promptName: string)

Auth Errors

RemoteAuthError

Thrown when authentication to a remote server fails (missing credentials).
PropertyTypeValue
codestringREMOTE_AUTH_ERROR
statusCodenumber401
isPublicbooleantrue
appIdstringRemote app identifier
detailsstring | undefinedAdditional details
mcpErrorCodenumber-32001
new RemoteAuthError(appId: string, details?: string)

RemoteAuthorizationError

Thrown when authorization to a remote resource/tool fails (insufficient credentials).
PropertyTypeValue
codestringREMOTE_AUTHORIZATION_ERROR
statusCodenumber403
isPublicbooleantrue
appIdstringRemote app identifier
resourcestring | undefinedThe denied resource
mcpErrorCodenumber-32003
new RemoteAuthorizationError(appId: string, resource?: string)

Execution Errors

RemoteToolExecutionError

Thrown when a remote tool execution fails.
PropertyTypeValue
codestringREMOTE_TOOL_EXECUTION_ERROR
statusCodenumber500
isPublicbooleantrue
appIdstringRemote app identifier
toolNamestringThe failed tool
originalErrorError | undefinedThe underlying cause
mcpErrorCodenumber-32603
new RemoteToolExecutionError(appId: string, toolName: string, originalError?: Error)

RemoteResourceReadError

Thrown when reading a remote resource fails.
PropertyTypeValue
codestringREMOTE_RESOURCE_READ_ERROR
statusCodenumber500
isPublicbooleantrue
appIdstringRemote app identifier
uristringThe resource URI
originalErrorError | undefinedThe underlying cause
mcpErrorCodenumber-32603
new RemoteResourceReadError(appId: string, uri: string, originalError?: Error)

RemotePromptGetError

Thrown when getting a remote prompt fails.
PropertyTypeValue
codestringREMOTE_PROMPT_GET_ERROR
statusCodenumber500
isPublicbooleantrue
appIdstringRemote app identifier
promptNamestringThe prompt name
originalErrorError | undefinedThe underlying cause
mcpErrorCodenumber-32603
new RemotePromptGetError(appId: string, promptName: string, originalError?: Error)

Transport Errors

RemoteTransportError

Thrown when transport initialization fails for a remote app.
PropertyTypeValue
codestringREMOTE_TRANSPORT_ERROR
statusCodenumber500
isPublicbooleanfalse
appIdstringRemote app identifier
transportTypestringThe transport type
originalErrorError | undefinedThe underlying cause
new RemoteTransportError(appId: string, transportType: string, originalError?: Error)

RemoteUnsupportedTransportError

Thrown when an unsupported transport type is specified for a remote app.
PropertyTypeValue
codestringREMOTE_UNSUPPORTED_TRANSPORT
statusCodenumber400
isPublicbooleantrue
transportTypestringThe unsupported type
new RemoteUnsupportedTransportError(transportType: string)

Capability Errors

RemoteCapabilityDiscoveryError

Thrown when capability discovery fails for a remote server.
PropertyTypeValue
codestringREMOTE_CAPABILITY_DISCOVERY_ERROR
statusCodenumber500
isPublicbooleanfalse
appIdstringRemote app identifier
originalErrorError | undefinedThe underlying cause
new RemoteCapabilityDiscoveryError(appId: string, originalError?: Error)

RemoteCapabilityNotSupportedError

Thrown when a remote server doesn’t support a required capability.
PropertyTypeValue
codestringREMOTE_CAPABILITY_NOT_SUPPORTED
statusCodenumber400
isPublicbooleantrue
appIdstringRemote app identifier
capabilitystringThe missing capability
new RemoteCapabilityNotSupportedError(appId: string, capability: string)

Configuration Errors

RemoteConfigurationError

Thrown when a remote app’s configuration is invalid.
PropertyTypeValue
codestringREMOTE_CONFIGURATION_ERROR
statusCodenumber400
isPublicbooleantrue
appIdstringRemote app identifier
configFieldstring | undefinedThe invalid field
detailsstring | undefinedAdditional details
new RemoteConfigurationError(appId: string, configField?: string, details?: string)

RemoteNotConnectedError

Thrown when an operation is attempted on a remote app that is not connected.
PropertyTypeValue
codestringREMOTE_NOT_CONNECTED
statusCodenumber503
isPublicbooleantrue
appIdstringRemote app identifier
new RemoteNotConnectedError(appId: string)

Retry Errors

InvalidRetryOptionsError

Thrown when retry configuration is invalid (e.g., maxAttempts < 1).
PropertyTypeValue
codestringINVALID_RETRY_OPTIONS
statusCodenumber500
isPublicbooleanfalse
optionstringThe invalid option name
valueunknownThe invalid value
new InvalidRetryOptionsError(option: string, value: unknown, reason: string)
Example:
import { InvalidRetryOptionsError } from '@frontmcp/sdk';

throw new InvalidRetryOptionsError('maxAttempts', 0, 'must be >= 1');