Zum Hauptinhalt springen

Klasse: MCPAuthAuthServerError

Fehler, der ausgelöst wird, wenn ein Problem mit dem entfernten Autorisierungsserver auftritt.

Erbt von​

Konstruktoren​

Konstruktor​

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

Parameter​

code​

AuthServerErrorCode

cause?​

unknown

Rückgabewert​

MCPAuthAuthServerError

Überschreibt​

MCPAuthError.constructor

Eigenschaften​

cause?​

readonly optional cause: unknown;

Geerbt von​

MCPAuthError.cause


code​

readonly code: AuthServerErrorCode;

Der Fehlercode im snake_case-Format.

Geerbt von​

MCPAuthError.code


message​

message: string;

Geerbt von​

MCPAuthError.message


name​

name: string = 'MCPAuthAuthServerError';

Überschreibt​

MCPAuthError.name


stack?​

optional stack: string;

Geerbt von​

MCPAuthError.stack


prepareStackTrace()?​

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

Optionale Überschreibung zur Formatierung von Stacktraces

Parameter​

err​

Error

stackTraces​

CallSite[]

Rückgabewert​

any

Siehe​

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

Geerbt von​

MCPAuthError.prepareStackTrace


stackTraceLimit​

static stackTraceLimit: number;

Geerbt von​

MCPAuthError.stackTraceLimit

Methoden​

toJson()​

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

Konvertiert den Fehler in ein HTTP-Response-freundliches JSON-Format.

Parameter​

showCause​

boolean = false

Gibt an, ob die Ursache des Fehlers in der JSON-Antwort enthalten sein soll. Standardmäßig false.

Rückgabewert​

Record<string, unknown>

Geerbt von​

MCPAuthError.toJson


captureStackTrace()​

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

Erstellt die .stack-Eigenschaft auf einem Zielobjekt

Parameter​

targetObject​

object

constructorOpt?​

Function

Rückgabewert​

void

Geerbt von​

MCPAuthError.captureStackTrace