Skip to content

PluginApiRevokedError

Thrown when a property is read from a handle whose provider has since unloaded.

This is the point of handing out a revocable handle rather than the raw object: a consumer that cached the API in a field and kept using it across a disable gets an error naming the provider, instead of Cannot read properties of undefined somewhere deep inside a torn-down plugin.

Import:

import { PluginApiRevokedError } from 'obsidian-dev-utils/obsidian/plugin/plugin-api';

Signature:

export class PluginApiRevokedError extends PluginApiUnavailableError

Extends: PluginApiUnavailableError

Constructor

new PluginApiRevokedError(pluginId: string)

Creates a PluginApiRevokedError.

Properties

PropertyTypeDescription
pluginIdstringThe manifest.id of the plugin whose API was requested.
(Inherited from PluginApiUnavailableError)
reasonPluginApiUnavailabilityReasonWhich of the five failures occurred.
(Inherited from PluginApiUnavailableError)

Links to this page: