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

クラス: MCPAuthBearerAuthError

Bearer トークンによる認証 (Authentication) 時に問題が発生した場合にスローされるエラーです。

継承​

コンストラクター​

コンストラクター​

new MCPAuthBearerAuthError(code: BearerAuthErrorCode, cause?: MCPAuthBearerAuthErrorDetails): MCPAuthBearerAuthError;

パラメーター​

code​

BearerAuthErrorCode

cause?​

MCPAuthBearerAuthErrorDetails

戻り値​

MCPAuthBearerAuthError

オーバーライド​

MCPAuthError.constructor

プロパティ​

cause?​

readonly optional cause: MCPAuthBearerAuthErrorDetails;

継承元​

MCPAuthError.cause


code​

readonly code: BearerAuthErrorCode;

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

継承元​

MCPAuthError.code


message​

message: string;

継承元​

MCPAuthError.message


name​

name: string = 'MCPAuthBearerAuthError';

オーバーライド​

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