Aller au contenu principal

Classe : MCPAuthAuthServerError

Erreur levée lorsqu'il y a un problème avec le serveur d’autorisation distant.

Hérite de​

Constructeurs​

Constructeur​

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

Paramètres​

code​

AuthServerErrorCode

cause ?​

unknown

Retourne​

MCPAuthAuthServerError

Redéfinit​

MCPAuthError.constructor

Propriétés​

cause ?​

readonly optional cause: unknown;

Hérité de​

MCPAuthError.cause


code​

readonly code: AuthServerErrorCode;

Le code d’erreur au format snake_case.

Hérité de​

MCPAuthError.code


message​

message: string;

Hérité de​

MCPAuthError.message


name​

name: string = 'MCPAuthAuthServerError';

Redéfinit​

MCPAuthError.name


stack ?​

optional stack: string;

Hérité de​

MCPAuthError.stack


prepareStackTrace() ?​

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

Surcharge optionnelle pour le formatage des traces de pile

Paramètres​

err​

Error

stackTraces​

CallSite[]

Retourne​

any

Voir​

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

Hérité de​

MCPAuthError.prepareStackTrace


stackTraceLimit​

static stackTraceLimit: number;

Hérité de​

MCPAuthError.stackTraceLimit

Méthodes​

toJson()​

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

Convertit l’erreur au format JSON adapté à une réponse HTTP.

Paramètres​

showCause​

boolean = false

Indique s’il faut inclure la cause de l’erreur dans la réponse JSON. Par défaut à false.

Retourne​

Record<string, unknown>

Hérité de​

MCPAuthError.toJson


captureStackTrace()​

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

Crée la propriété .stack sur un objet cible

Paramètres​

targetObject​

object

constructorOpt ?​

Function

Retourne​

void

Hérité de​

MCPAuthError.captureStackTrace