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

クラス: MCPAuthAuthServerError

リモート認可 (Authorization) サーバーで問題が発生した場合にスローされるエラーです。

継承

コンストラクター

コンストラクター

new MCPAuthAuthServerError(code: AuthServerErrorCode, cause?: unknown): MCPAuthAuthServerError;

パラメーター

code

AuthServerErrorCode

cause?

unknown

戻り値

MCPAuthAuthServerError

オーバーライド

MCPAuthError.constructor

プロパティ

cause?

readonly optional cause: unknown;

継承元

MCPAuthError.cause


code

readonly code: AuthServerErrorCode;

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

継承元

MCPAuthError.code


message

message: string;

継承元

MCPAuthError.message


name

name: string = 'MCPAuthAuthServerError';

オーバーライド

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