paperclipai/paperclip · error · Error
operationType must be ingest, query, lint, file-as-page, ind
Error message
operationType must be ingest, query, lint, file-as-page, index, distill, or backfill
What it means
Thrown by the create-operation worker action when params.operationType is not one of ingest|query|lint|file-as-page|index|distill|backfill. operationType selects which kind of Wiki operation issue to create; an unknown value cannot be routed to a handler.
Source
Thrown at packages/plugins/plugin-llm-wiki/src/worker.ts:290
return archiveSpace(ctx, {
companyId: readCompanyIdFromParams(params),
wikiId: stringField(params.wikiId),
spaceSlug: stringField(params.spaceSlug),
});
});
ctx.actions.register("create-operation", async (params) => {
const operationType = stringField(params.operationType);
if (
operationType !== "ingest" &&
operationType !== "query" &&
operationType !== "lint" &&
operationType !== "file-as-page" &&
operationType !== "index" &&
operationType !== "distill" &&
operationType !== "backfill"
) {
throw new Error("operationType must be ingest, query, lint, file-as-page, index, distill, or backfill");
}
return createOperationIssue(ctx, {
companyId: readCompanyIdFromParams(params),
wikiId: stringField(params.wikiId),
spaceSlug: stringField(params.spaceSlug),
operationType,
title: stringField(params.title),
prompt: stringField(params.prompt),
useCheapModelProfile: params.useCheapModelProfile === true,
});
});
ctx.actions.register("capture-source", async (params) => {
return captureWikiSource(ctx, {
companyId: readCompanyIdFromParams(params),
wikiId: stringField(params.wikiId),
spaceSlug: stringField(params.spaceSlug),
sourceType: stringField(params.sourceType),View on GitHub (pinned to 67001ec6eb)
Solutions
- Pass one of: ingest, query, lint, file-as-page, index, distill, backfill.
- Use kebab-case exactly ('file-as-page', not 'file_as_page').
- Upgrade the plugin if the caller requires an operation type added in a newer version.
Example fix
// before
ctx.actions.run('create-operation', { companyId, operationType: 'search' });
// after
ctx.actions.run('create-operation', { companyId, operationType: 'query' }); Defensive patterns
Strategy: type-guard
Validate before calling
const OPERATION_TYPES = ['ingest','query','lint','file-as-page','index','distill','backfill'] as const;
function assertOperationType(value: unknown) {
if (typeof value !== 'string' || !(OPERATION_TYPES as readonly string[]).includes(value)) {
throw new Error(`operationType must be one of ${OPERATION_TYPES.join(', ')}`);
}
} Type guard
const OPERATION_TYPES = ['ingest','query','lint','file-as-page','index','distill','backfill'] as const;
type WikiOperationType = typeof OPERATION_TYPES[number];
function isOperationType(value: unknown): value is WikiOperationType {
return typeof value === 'string' && (OPERATION_TYPES as readonly string[]).includes(value);
} Prevention
- Restrict operationType to a dropdown sourced from the constant.
- Use kebab-case exactly ('file-as-page').
When it happens
Trigger: Calling the create-operation action with operationType missing, blank, or a value outside the seven allowed (e.g. 'search', 'embedding', 'qa').
Common situations: Caller uses a free-text operation type; typo (e.g. 'file_as_page' vs 'file-as-page'); version mismatch where the caller expects a newer operation type not yet supported by this plugin version.
Related errors
- selected_projects exceeds the hard cap of ${MAX_PAPERCLIP_PR
- Project belongs to another company or does not exist: ${proj
- root_issues exceeds the hard cap of ${MAX_PAPERCLIP_PROFILE_
- Issue belongs to another company or does not exist: ${issueI
- Wiki page writes must target AGENTS.md, IDEA.md, or wiki/: $
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/400a384759fdf1c2.
Report an issue: GitHub.