gotify/server · error

plugin is disabled

Error message

plugin is disabled

What it means

requirePluginEnabled middleware in plugin/pluginenabled.go aborts with 400 when the plugin configuration for the route's id is missing (conf == nil) or has Enabled == false, blocking the request from reaching a disabled plugin's endpoints. It is a generic per-request guard on plugin enablement state stored in the database.

Source

Thrown at plugin/pluginenabled.go:17

package plugin

import (
	"errors"

	"github.com/gin-gonic/gin"
)

func requirePluginEnabled(id uint, db Database) gin.HandlerFunc {
	return func(c *gin.Context) {
		conf, err := db.GetPluginConfByID(id)
		if err != nil {
			c.AbortWithError(500, err)
			return
		}
		if conf == nil || !conf.Enabled {
			c.AbortWithError(400, errors.New("plugin is disabled"))
		}
	}
}

View on GitHub (pinned to 14bfc25627)

Solutions

  1. Enable the plugin via SetPluginEnabled before calling its endpoints
  2. Confirm the request targets the correct plugin id and that the plugin conf row exists in the database
  3. Handle the 400 response client-side by refreshing plugin state instead of retrying
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at plugin/pluginenabled.go:17 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gotify/server@14bfc25627 (2026-09-05). Data as JSON: /api/errors/85b81caf5abd46b3. Report an issue: GitHub.