Aller au contenu principal

Classe : MCPAuthConfigError

Erreur levée lorsqu'il y a un problème de configuration avec mcp-auth.

Hérite de​

Constructeurs​

Constructeur​

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

Paramètres​

code​

string

Le code d'erreur au format snake_case.

message​

string

Une description lisible par l'humain de l'erreur.

Retourne​

MCPAuthConfigError

Hérité de​

MCPAuthError.constructor

Propriétés​

cause ?​

optional cause: unknown;

Hérité de​

MCPAuthError.cause


code​

readonly code: string;

Le code d'erreur au format snake_case.

Hérité de​

MCPAuthError.code


message​

message: string;

Hérité de​

MCPAuthError.message


name​

name: string = 'MCPAuthConfigError';

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 formater les 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 en un 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