{"record":{"id":"5937d062300e36ff","repo":"influxdata/influxdb","slug":"0-error","errorCode":null,"errorMessage":"{0}","messagePattern":"\\{0\\}","errorType":"exception","errorClass":"ExecutePluginError","httpStatus":null,"severity":"error","filePath":"influxdb3_py_api/src/error.rs","lineNumber":20,"sourceCode":"\n#[derive(Debug, Error)]\npub enum ExecutePluginError {\n    #[error(\n        \"the process_writes function is not present in the plugin. Should be defined as: process_writes(influxdb3_local, table_batches, args=None)\"\n    )]\n    MissingProcessWritesFunction,\n\n    #[error(\n        \"the process_request function is not present in the plugin. Should be defined as: process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None) -> Tuple[str, Optional[Dict[str, str]]]\"\n    )]\n    MissingProcessRequestFunction,\n\n    #[error(\n        \"the process_scheduled_call function is not present in the plugin. Should be defined as: process_scheduled_call(influxdb3_local, call_time, args=None)\"\n    )]\n    MissingProcessScheduledCallFunction,\n\n    #[error(\"{0}\")]\n    PluginError(#[from] anyhow::Error),\n}\n\npub type ExecutePluginResult<T> = Result<T, ExecutePluginError>;\n","sourceCodeStart":2,"sourceCodeEnd":25,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_py_api/src/error.rs#L2-L25","documentation":"ExecutePluginError::PluginError wraps any anyhow::Error propagated out of Python plugin execution (e.g. an exception raised inside the plugin or a helper failure), displayed via its Display message ('{0}'). The message seen is therefore the underlying plugin/host error string, not a fixed text.","triggerScenarios":"Any failure during plugin execution that is converted into an anyhow error and returned through ExecutePluginResult — most commonly an uncaught Python exception inside process_writes/process_request/process_scheduled_call, or failures from influxdb3_local helper calls.","commonSituations":"Plugin code raises NameError/TypeError/KeyError at runtime; helper API calls fail (invalid query, bad write); the plugin author's own raise statements bubble up.","solutions":["Read the wrapped message after 'PluginError' — it contains the actual root cause.","Wrap plugin bodies in try/except and log via influxdb3_local.error with context, or fix the underlying bug the message names.","Test the plugin locally (e.g. via the test harness) to reproduce the exception and get a full traceback.","Check arguments passed via the trigger's args string for type/value mistakes."],"exampleFix":"# before\ndef process_writes(influxdb3_local, table_batches, args=None):\n    influxdb3_local.query(\"SELEC * FROM t\")  # raises\n# after\ndef process_writes(influxdb3_local, table_batches, args=None):\n    try:\n        influxdb3_local.query(\"SELECT * FROM t\")\n    except Exception as e:\n        influxdb3_local.error(f\"query failed: {e}\")","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"# Inside the plugin, guard every fallible operation and surface context:\ndef process_writes(influxdb3_local, table_batches, args=None):\n    try:\n        do_work(table_batches, args)\n    except Exception as e:\n        influxdb3_local.error(f\"process_writes failed: {e}\")\n        raise  # or handle, to avoid a bare PluginError upstream","preventionTips":["Wrap plugin bodies in try/except and log with context via influxdb3_local.error","Validate the trigger's args string before parsing/using it","Test plugins locally against representative data","Read the wrapped message after PluginError to find the root cause"],"tags":["python","plugin","processing-engine","wrapped-error"],"backgroundTag":"api-error-response","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"}