メインコンテンツにスキップ

クラス: MCPAuthConfigError

mcp-auth の設定に問題がある場合にスローされるエラーです。

継承元

コンストラクター

コンストラクター

new MCPAuthConfigError(code: string, message: string): MCPAuthConfigError;

パラメーター

code

string

スネークケース形式のエラーコードです。

message

string

エラーの人間が読める説明です。

戻り値

MCPAuthConfigError

継承元

MCPAuthError.constructor

プロパティ

cause?

optional cause: unknown;

継承元

MCPAuthError.cause


code

readonly code: string;

スネークケース形式のエラーコードです。

継承元

MCPAuthError.code


message

message: string;

継承元

MCPAuthError.message


name

name: string = 'MCPAuthConfigError';

オーバーライド

MCPAuthError.name


stack?

optional stack: string;

継承元

MCPAuthError.stack


prepareStackTrace()?

static optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

パラメーター

err

Error

stackTraces

CallSite[]

戻り値

any

参照

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

継承元

MCPAuthError.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number;

継承元

MCPAuthError.stackTraceLimit

メソッド

toJson()

toJson(showCause: boolean): Record<string, unknown>;

エラーを HTTP レスポンスに適した JSON 形式に変換します。

パラメーター

showCause

boolean = false

JSON レスポンスにエラーの原因を含めるかどうか。 デフォルトは false です。

戻り値

Record<string, unknown>

継承元

MCPAuthError.toJson


captureStackTrace()

static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター

targetObject

object

constructorOpt?

Function

戻り値

void

継承元

MCPAuthError.captureStackTrace