{"record":{"id":"8f3931111645b5e3","repo":"influxdata/influxdb","slug":"failed-to-parse-trigger-from","errorCode":null,"errorMessage":"failed to parse trigger from {}","messagePattern":"failed to parse trigger from (.+?)","errorType":"error_code","errorClass":"CatalogError","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog/src/error.rs","lineNumber":264,"sourceCode":"    ProcessingEnginePluginNotFound {\n        plugin_name: String,\n        database_name: String,\n    },\n\n    #[error(\"Processing Engine Unimplemented: {}\", feature_description)]\n    ProcessingEngineUnimplemented { feature_description: String },\n\n    #[error(\n        \"Processing Engine Trigger {} not in DB {}\",\n        trigger_name,\n        database_name\n    )]\n    ProcessingEngineTriggerNotFound {\n        database_name: String,\n        trigger_name: String,\n    },\n\n    #[error(\"failed to parse trigger from {}\", trigger_spec)]\n    ProcessingEngineTriggerSpecParseError { trigger_spec: String },\n\n    #[error(\"last cache size must be greater than 0\")]\n    InvalidLastCacheSize,\n\n    #[error(\"failed to parse trigger from {trigger_spec}{}\", .context.as_ref().map(|context| format!(\": {context}\")).unwrap_or_default())]\n    TriggerSpecificationParseError {\n        trigger_spec: String,\n        context: Option<String>,\n    },\n\n    #[error(\"invalid error behavior {0}\")]\n    InvalidErrorBehavior(String),\n\n    #[error(\"cannot parse token permission, {0}\")]\n    CannotParsePermissionForToken(String),\n\n    #[error(\"token name already exists, {0}\")]","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error.rs#L246-L282","documentation":"The catalog failed to parse a trigger specification string (trigger_spec) into a valid trigger definition. Trigger specs encode how/when a trigger runs, and this error means the supplied string did not match any recognized specification format.","triggerScenarios":"Creating a Processing Engine trigger with a malformed spec string (e.g. a cron or every-duration spec with invalid syntax) passed to CREATE TRIGGER or the trigger-creation catalog API.","commonSituations":"Typos in cron expressions or 'every' durations (e.g. 'every: 1m' vs 'every 1m'); quoting/whitespace issues in shell commands; copying specs from docs of a different version with a changed spec grammar.","solutions":["Check the exact trigger spec grammar for your version and correct the string (e.g. 'every 1m' or a valid cron expression).","Quote the spec properly in your shell so spaces are preserved.","Test the spec with a minimal trigger creation call before deploying in scripts.","If the error came with a context variant (TriggerSpecificationParseError with context), read the appended context for the specific parse failure."],"exampleFix":"// before\nCREATE TRIGGER t ON DATABASE mydb EVERY 5x ...\n// after (valid spec syntax)\nCREATE TRIGGER t ON DATABASE mydb EVERY 5 minutes ...","handlingStrategy":"validation","validationCode":"// Validate trigger spec shape before sending\nfunction isValidTriggerSpec(spec) {\n  return /^(every \\d+\\s*(s|m|h|d)(\\s+\\d+\\s*(s|m|h|d))*|cron .+|at .+)$/i.test(spec.trim());\n}\nif (!isValidTriggerSpec(triggerSpec)) {\n  throw new Error(`bad trigger spec: ${triggerSpec}`);\n}","typeGuard":"function isTriggerSpec(value) {\n  return typeof value === 'string' && value.trim().length > 0 && /^(every|cron|at)\\s/i.test(value.trim());\n}","tryCatchPattern":"try {\n  await createTrigger(db, { triggerSpec });\n} catch (e) {\n  if (String(e).includes('failed to parse trigger')) {\n    console.error(`Invalid spec '${triggerSpec}'; expected 'every <duration>' or 'cron <expr>'`);\n  } else throw e;\n}","preventionTips":["Quote trigger specs in shell so spaces survive","Keep a small table of valid spec examples per server version in your runbooks","Unit-test spec strings used in deployment templates"],"tags":["processing-engine","trigger","parse-error","influxdb"],"backgroundTag":"invalid-argument-format","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}