Class: MCPAuthTokenVerificationError
Error thrown when there is an issue when verifying tokens.
Extends
Constructors
Constructor
new MCPAuthTokenVerificationError(code: MCPAuthTokenVerificationErrorCode, cause?: unknown): MCPAuthTokenVerificationError;
Parameters
code
MCPAuthTokenVerificationErrorCode
cause?
unknown
Returns
MCPAuthTokenVerificationError
Overrides
Properties
cause?
readonly optional cause: unknown;
Inherited from
code
readonly code: MCPAuthTokenVerificationErrorCode;
The error code in snake_case format.
Inherited from
message
message: string;
Inherited from
name
name: string = 'MCPAuthTokenVerificationError';
Overrides
stack?
optional stack: string;
Inherited from
prepareStackTrace()?
static optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any;
Optional override for formatting stack traces
Parameters
err
Error
stackTraces
CallSite
[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
MCPAuthError
.prepareStackTrace
stackTraceLimit
static stackTraceLimit: number;
Inherited from
Methods
toJson()
toJson(showCause: boolean): Record<string, unknown>;
Converts the error to a HTTP response friendly JSON format.
Parameters
showCause
boolean
= false
Whether to include the cause of the error in the JSON response.
Defaults to false
.
Returns
Record
<string
, unknown
>
Inherited from
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Create .stack property on a target object
Parameters
targetObject
object
constructorOpt?
Function
Returns
void