From 3ca789979aed94e9fbb4c5668785e9b86a12f71f Mon Sep 17 00:00:00 2001 From: Conor Macpherson Date: Wed, 19 Apr 2023 09:23:45 -0400 Subject: [PATCH] remove other use of relfection to determine error. --- server/channels/api4/hosted_customer.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/channels/api4/hosted_customer.go b/server/channels/api4/hosted_customer.go index 5affb6c1b1..c7beef7ebd 100644 --- a/server/channels/api4/hosted_customer.go +++ b/server/channels/api4/hosted_customer.go @@ -10,7 +10,6 @@ import ( "fmt" "io" "net/http" - "reflect" "time" "github.com/pkg/errors" @@ -374,10 +373,9 @@ func selfHostedConfirmExpand(c *Context, w http.ResponseWriter, r *http.Request) return } - license, err := c.App.Srv().Platform().SaveLicense([]byte(confirmResponse.License)) - + license, appErr := c.App.Srv().Platform().SaveLicense([]byte(confirmResponse.License)) // dealing with an AppError - if !(reflect.ValueOf(err).Kind() == reflect.Ptr && reflect.ValueOf(err).IsNil()) { + if appErr != nil { if confirmResponse != nil { c.App.NotifySelfHostedSignupProgress(confirmResponse.Progress, user.Id) }