{"record":{"id":"85b81caf5abd46b3","repo":"gotify/server","slug":"plugin-is-disabled","errorCode":null,"errorMessage":"plugin is disabled","messagePattern":"plugin is disabled","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"plugin/pluginenabled.go","lineNumber":17,"sourceCode":"package plugin\n\nimport (\n\t\"errors\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc requirePluginEnabled(id uint, db Database) gin.HandlerFunc {\n\treturn func(c *gin.Context) {\n\t\tconf, err := db.GetPluginConfByID(id)\n\t\tif err != nil {\n\t\t\tc.AbortWithError(500, err)\n\t\t\treturn\n\t\t}\n\t\tif conf == nil || !conf.Enabled {\n\t\t\tc.AbortWithError(400, errors.New(\"plugin is disabled\"))\n\t\t}\n\t}\n}\n","sourceCodeStart":1,"sourceCodeEnd":21,"githubUrl":"https://github.com/gotify/server/blob/14bfc256276775c425f988d621dccfe705de18ac/plugin/pluginenabled.go#L1-L21","documentation":"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.","triggerScenarios":"Thrown at plugin/pluginenabled.go:17 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the plugin via SetPluginEnabled before calling its endpoints","Confirm the request targets the correct plugin id and that the plugin conf row exists in the database","Handle the 400 response client-side by refreshing plugin state instead of retrying"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"14bfc256276775c425f988d621dccfe705de18ac","analyzedAt":"2026-09-05T12:52:36.781Z","contentChangedAt":"2026-09-05T12:52:36.781Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}