{"record":{"id":"608d0d41bcbe700e","repo":"influxdata/influxdb","slug":"the-process-request-function-is-not-present-in-the-plugin","errorCode":null,"errorMessage":"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]]]","messagePattern":"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\\]\\]\\]","errorType":"exception","errorClass":"ExecutePluginError","httpStatus":null,"severity":"error","filePath":"influxdb3_py_api/src/error.rs","lineNumber":10,"sourceCode":"use thiserror::Error;\n\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":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_py_api/src/error.rs#L1-L25","documentation":"The plugin host requires an HTTP/request trigger plugin module to expose a top-level process_request function with the signature process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None) returning a tuple of (body, optional headers dict). This error is raised when the module loaded for a request trigger does not define that function.","triggerScenarios":"Creating or invoking a request-path trigger whose Python module has no top-level process_request — e.g. the file only defines process_writes or process_scheduled_call, the name is misspelled, or the function is defined but under a different module than the one registered.","commonSituations":"Using a WAL/scheduled plugin file for an HTTP trigger; typos (process_requests, processRequest); forgetting the required Tuple[str, Optional[Dict[str, str]]] return contract after adding the function but naming it incorrectly.","solutions":["Add the module-level entry point: def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None): returning (body_str, headers_or_None).","Verify the function name spelling and that it is at module top level.","If the plugin was meant as a write or scheduled plugin, register it with the matching trigger specification instead.","Reload/re-create the trigger so the host re-imports the module."],"exampleFix":"# before\ndef handle(influxdb3_local, query_parameters, request_headers, request_body, args=None):\n    return \"ok\", None\n# after\ndef process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None):\n    return \"ok\", None","handlingStrategy":"validation","validationCode":"import inspect\ndef has_process_request(module) -> bool:\n    fn = getattr(module, \"process_request\", None)\n    return callable(fn) and len(inspect.signature(fn).parameters) >= 5","typeGuard":"def has_process_request(mod) -> bool:\n    return callable(getattr(mod, \"process_request\", None))","tryCatchPattern":"try:\n    run_request_plugin(path)\nexcept ExecutePluginError as e:\n    if \"process_request\" in str(e):\n        log.error(f\"plugin {path} is not a request plugin\")","preventionTips":["Only register modules exposing process_request for HTTP/request triggers","Return (str_body, headers_or_None) tuples from process_request","Keep a naming checklist for the three entry-point functions","Add import-time assertions in plugin files documenting their trigger type"],"tags":["python","plugin","processing-engine","missing-function","http-trigger"],"backgroundTag":"missing-required-argument","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"}