influxdata/influxdb · error · ExecutePluginError

the process_request function is not present in the plugin…

Error message

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]]]

What it means

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.

Solutions

  1. 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).
  2. Verify the function name spelling and that it is at module top level.
  3. If the plugin was meant as a write or scheduled plugin, register it with the matching trigger specification instead.
  4. Reload/re-create the trigger so the host re-imports the module.

Example fix

# before
def handle(influxdb3_local, query_parameters, request_headers, request_body, args=None):
    return "ok", None
# after
def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None):
    return "ok", None
Defensive patterns

Strategy: validation

Validate before calling

import inspect
def has_process_request(module) -> bool:
    fn = getattr(module, "process_request", None)
    return callable(fn) and len(inspect.signature(fn).parameters) >= 5

Type guard

def has_process_request(mod) -> bool:
    return callable(getattr(mod, "process_request", None))

Try / catch

try:
    run_request_plugin(path)
except ExecutePluginError as e:
    if "process_request" in str(e):
        log.error(f"plugin {path} is not a request plugin")

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/608d0d41bcbe700e. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_py_api/src/error.rs:10

use thiserror::Error;

#[derive(Debug, Error)]
pub enum ExecutePluginError {
    #[error(
        "the process_writes function is not present in the plugin. Should be defined as: process_writes(influxdb3_local, table_batches, args=None)"
    )]
    MissingProcessWritesFunction,

    #[error(
        "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]]]"
    )]
    MissingProcessRequestFunction,

    #[error(
        "the process_scheduled_call function is not present in the plugin. Should be defined as: process_scheduled_call(influxdb3_local, call_time, args=None)"
    )]
    MissingProcessScheduledCallFunction,

    #[error("{0}")]
    PluginError(#[from] anyhow::Error),
}

pub type ExecutePluginResult<T> = Result<T, ExecutePluginError>;

View on GitHub (pinned to 06200ef96b)