paperclipai/paperclip · error · Error
Plugin "${pluginId}" must provide a non-empty event name.
Error message
Plugin "${pluginId}" must provide a non-empty event name. What it means
Input guard in emit: the event name is empty or whitespace. The bus derives the full event type by prefixing plugin.<pluginId>., and an empty base name would produce an unroutable event; the empty name argument is at fault.
Source
Thrown at server/src/services/plugin-event-bus.ts:253
handler = maybeFn;
}
subsFor(pluginId).push({ eventPattern, filter, handler });
},
/**
* Emit a plugin-namespaced event. The event type is automatically
* prefixed with `plugin.<pluginId>.` so:
* - `emit("sync-done", payload)` becomes `"plugin.acme.linear.sync-done"`.
*
* Requires the `events.emit` capability (enforced by the host layer).
*
* @throws {Error} if `name` already contains the `plugin.` prefix
* (prevents cross-namespace spoofing).
*/
async emit(name: string, companyId: string, payload: unknown): Promise<PluginEventBusEmitResult> {
if (!name || name.trim() === "") {
throw new Error(`Plugin "${pluginId}" must provide a non-empty event name.`);
}
if (!companyId || companyId.trim() === "") {
throw new Error(`Plugin "${pluginId}" must provide a companyId when emitting events.`);
}
if (name.startsWith("plugin.")) {
throw new Error(
`Plugin "${pluginId}" must not include the "plugin." prefix when emitting events. ` +
`Emit the bare event name (e.g. "sync-done") and the bus will namespace it automatically.`,
);
}
const eventType = `plugin.${pluginId}.${name}` as const;
const event: PluginEvent = {
eventId: crypto.randomUUID(),
eventType,
companyId,View on GitHub (pinned to 120ae5428f)
Solutions
- Pass a non-empty event name when emitting plugin events.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/plugin-event-bus.ts:253 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/263b9f35cd1389d8.
Report an issue: GitHub.