gatsbyjs/gatsby · error

Plugin option filter

Error message

Plugin option filter ${name} didn't return a filtered options object

What it means

After an options processor's test matched, its processor() returned a falsy value instead of a filtered options object. This is a defensive check against a broken processor in the plugin's own options-processing pipeline, not user configuration.

Solutions

  1. Update the named filter's processor function so it returns the filtered options object.
  2. Check the processor does not mutate and return undefined; return the modified options explicitly.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts:162 when the library encounters an invalid state.

Common situations: Occurs when a named plugin option filter does not return a filtered options object. Ensure the filter function returns the (modified) options object.


AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13). Data as JSON: /api/errors/598781012ab23c46. Report an issue: GitHub.

Appendix: source

Thrown at packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts:162

  optionsProcessors.forEach(({ test, processor, name }) => {
    if (!name) {
      helpers.reporter.panic(
        formatLogMessage(
          `Plugin option filter is unnamed\n\n${test.toString()}\n\n${processor.toString()}`
        )
      )
    }

    if (test({ helpers, userPluginOptions })) {
      const filteredUserPluginOptions = processor({
        helpers,
        userPluginOptions,
      })

      if (filteredUserPluginOptions) {
        userPluginOptions = filteredUserPluginOptions
      } else {
        helpers.reporter.panic(
          formatLogMessage(
            `Plugin option filter ${name} didn't return a filtered options object`
          )
        )
      }
    }
  })

  return userPluginOptions
}

View on GitHub (pinned to 8b06340921)