Skip to content

PluginDataSizeLimitExceededError

Thrown when a plugin’s data.json is, or would become, larger than the configured limit.

The file on disk is never touched when this is thrown: an oversized existing file is left intact for the user to inspect or trim, and an oversized save is refused before anything is written, so the last good file remains.

Import:

import { PluginDataSizeLimitExceededError } from '@mnaoumov/obsidian-lib/data-handler';

Signature:

export class PluginDataSizeLimitExceededError extends Error

Extends: Error

Constructor

new PluginDataSizeLimitExceededError(params: PluginDataSizeLimitExceededErrorConstructorParams)

Creates a PluginDataSizeLimitExceededError.

Properties

PropertyTypeDescription
maxSizeInBytesnumberThe size limit, in bytes.
operationPluginDataOperationThe refused operation.
pathstringThe path of the plugin's data.json.
pluginIdstringThe manifest.id of the plugin.
pluginNamestringThe manifest.name of the plugin.
sizeInBytesnumberThe size of the existing file (load) or of the serialized data (save), in bytes.

Links to this page: