Class PluginNotInitializedException

Thrown when a plugin attempts to use a provided service before said service has been injected into the plugin (during init). This usually happens when a plugin attempts to use a service in its constructor, since plugins are initialized after instantiation.

Example

class TestPlugin extends ConversationPlugin {
constructor() {
super();
this.conversation.history.setContext(...); // This throws a PluginNotInitializedException
}

init(...) {
this.conversation.history.setContext(...); // This works
}
}

Hierarchy

  • Error
    • PluginNotInitializedException

Constructors

Properties

cause?: unknown
message: string
name: string
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc