Write Plugins v1.x

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

Introduction #

Whenever a plugin returns, rejects or throws an error, Kuzzle intercepts it and, by default, rethrows it as a PluginImplementationError error.

To prevent this, plugins have error constructors at their disposal. Plugins can also create their own errors by inheriting from the abstract KuzzleError object.

This section details the error constructors made available in the plugin context, an object containing a set of constructors, accessors and various other helpers, allowing plugins to interact with Kuzzle.

Each plugin receives its own context instance, provided to the plugin's init function.