diff --git a/server/plugin.go b/server/plugin.go index d151c259..3fbfcbc6 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -188,7 +188,7 @@ func (p *Plugin) OnConfigurationChange() error { jsonBytes, err := json.Marshal(ec.AdminAPIToken) if err != nil { - p.client.Log.Warn("Error marshaling the admin API token", "error", err) + p.client.Log.Warn("Error marshaling the admin API token", "error", err.Error()) return err } @@ -200,7 +200,7 @@ func (p *Plugin) OnConfigurationChange() error { encryptedAdminAPIToken, err := encrypt(jsonBytes, []byte(encryptionKey)) if err != nil { - p.client.Log.Warn("Error encrypting the admin API token", "error", err) + p.client.Log.Warn("Error encrypting the admin API token", "error", err.Error()) return err } ec.AdminAPIToken = string(encryptedAdminAPIToken) @@ -378,11 +378,11 @@ func (p *Plugin) SetupAutolink(instances *Instances) { switch instance := instance.(type) { case *cloudInstance: if err = p.AddAutolinksForCloudInstance(instance); err != nil { - p.client.Log.Info("could not install autolinks for cloud instance", "instance", instance.BaseURL, "error", err) + p.client.Log.Info("could not install autolinks for cloud instance", "instance", instance.BaseURL, "error", err.Error()) } case *cloudOAuthInstance: if err = p.AddAutolinksForCloudOAuthInstance(instance); err != nil { - p.client.Log.Info("could not install autolinks for cloud-oauth instance", "instance", instance.JiraBaseURL, "error", err) + p.client.Log.Info("could not install autolinks for cloud-oauth instance", "instance", instance.JiraBaseURL, "error", err.Error()) } } } diff --git a/server/utils.go b/server/utils.go index e1c5251b..0bda1211 100644 --- a/server/utils.go +++ b/server/utils.go @@ -189,13 +189,13 @@ func (p *Plugin) SetAdminAPITokenRequestHeader(req *http.Request) error { encryptedAdminAPIToken := p.getConfig().AdminAPIToken jsonBytes, err := decrypt([]byte(encryptedAdminAPIToken), []byte(p.getConfig().EncryptionKey)) if err != nil { - p.client.Log.Warn("Error decrypting admin API token", "error", err) + p.client.Log.Warn("Error decrypting admin API token", "error", err.Error()) return err } var adminAPIToken string err = json.Unmarshal(jsonBytes, &adminAPIToken) if err != nil { - p.client.Log.Warn("Error unmarshalling admin API token", "error", err) + p.client.Log.Warn("Error unmarshalling admin API token", "error", err.Error()) return err }