paperclipai/paperclip · error
err instanceof Error ? err.message : String(err)
Error message
err instanceof Error ? err.message : String(err)
What it means
400 from manual job trigger (POST job trigger route). Not a message constant: the handler stringifies an arbitrary thrown error (err.message or String(err)) and returns it with 400 when scheduler.triggerJob fails for the requested job.
Source
Thrown at server/src/routes/plugins.ts:2660
const { pluginId, jobId } = req.params;
const plugin = await resolvePlugin(registry, pluginId);
if (!plugin) {
res.status(404).json({ error: "Plugin not found" });
return;
}
const job = await jobDeps.jobStore.getJobByIdForPlugin(plugin.id, jobId);
if (!job) {
res.status(404).json({ error: "Job not found" });
return;
}
try {
const result = await jobDeps.scheduler.triggerJob(jobId, "manual");
res.json(result);
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
res.status(400).json({ error: message });
}
});
// ===========================================================================
// Webhook ingestion route
// ===========================================================================
/**
* POST /api/plugins/:pluginId/webhooks/:endpointKey
*
* Receive an inbound webhook delivery for a plugin.
*
* This route is called by external systems (e.g. GitHub, Linear, Stripe) to
* deliver webhook payloads to a plugin. The host validates that:
* 1. The plugin exists and is in 'ready' state
* 2. The plugin declares the `webhooks.receive` capability
* 3. The `endpointKey` matches a declared webhook in the manifest
*View on GitHub (pinned to a7e689b3c3)
Solutions
- Inspect the underlying error message returned in the response; it contains the actual failure reason from the job run.
- Check server logs around the timestamp of the failed job for the full stack trace.
- Verify the plugin job handler is not throwing and that required configuration and credentials are set.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at server/src/routes/plugins.ts:2638 when the library encounters an invalid state.
Common situations: Occurs when a plugin job execution fails and the route surfaces the caught error message. Common causes: misconfigured plugin job, missing credentials, or a bug in the plugin's job handler.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18).
Data as JSON: /api/errors/44e0adb9d0442e38.
Report an issue: GitHub.