Documentation - v1.2.0-alpha.3
    Preparing search index...

    Helper class for generating exceptions with error codes.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    DEFAULT_HELPLINK: "https://aka.ms/M365AgentsErrorCodesJS/#{errorCode}" = 'https://aka.ms/M365AgentsErrorCodesJS/#{errorCode}'

    Default help link template for error codes. The {errorCode} token will be replaced with the actual error code.

    Methods

    • Generates a typed exception with error code and help link. The message format is: [CODE] - [message] - [helplink]

      Type Parameters

      • T extends Error

      Parameters

      • ErrorType: new (message: string, innerException?: Error) => T

        The constructor of the error type to create

      • errorDefinition: AgentErrorDefinition

        The error definition containing code, description, and optional help link

      • OptionalinnerException: Error

        Optional inner exception

      • Optionalparams: { [key: string]: string }

        Optional parameters object for message formatting with key-value pairs

      Returns T & AgentError

      A new exception instance with error code and help link, typed as AgentError