diff --git a/server/.golangci.yml b/server/.golangci.yml index 03365f1e3e..e6e1c26cc1 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -139,7 +139,6 @@ issues: channels/app/plugin_health_check_test.go|\ channels/app/plugin_hooks_test.go|\ channels/app/plugin_install.go|\ - channels/app/plugin_reattach.go|\ channels/app/plugin_requests.go|\ channels/app/plugin_signature.go|\ channels/app/plugin_signature_test.go|\ diff --git a/server/channels/app/plugin_reattach.go b/server/channels/app/plugin_reattach.go index 846c681a5c..2cab6abe69 100644 --- a/server/channels/app/plugin_reattach.go +++ b/server/channels/app/plugin_reattach.go @@ -20,7 +20,10 @@ func (ch *Channels) ReattachPlugin(manifest *model.Manifest, pluginReattachConfi return model.NewAppError("ReattachPlugin", "app.plugin.disabled.app_error", nil, "", http.StatusNotImplemented) } - ch.DetachPlugin(manifest.Id) + appErr := ch.DetachPlugin(manifest.Id) + if appErr != nil { + return appErr + } // Reattach to the plugin if err := pluginsEnvironment.Reattach(manifest, pluginReattachConfig); err != nil {