From d2ce70b4b155264efd968a79c2f9d7e36ca12089 Mon Sep 17 00:00:00 2001 From: Ben Schumacher Date: Tue, 2 Apr 2024 17:43:23 +0200 Subject: [PATCH] [MM-57415] Removed unused IsOAuth field from AppError (#26578) --- server/channels/web/handlers.go | 1 - server/public/model/utils.go | 2 -- 2 files changed, 3 deletions(-) diff --git a/server/channels/web/handlers.go b/server/channels/web/handlers.go index 9532eb6f12..f2caca1f83 100644 --- a/server/channels/web/handlers.go +++ b/server/channels/web/handlers.go @@ -404,7 +404,6 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { c.Err.WipeDetailed() c.Err.StatusCode = 500 c.Err.Where = "" - c.Err.IsOAuth = false } if IsAPICall(c.App, r) || IsWebhookCall(c.App, r) || IsOAuthAPICall(c.App, r) || r.Header.Get("X-Mobile-App") != "" { diff --git a/server/public/model/utils.go b/server/public/model/utils.go index 3533634b26..2d128b0a91 100644 --- a/server/public/model/utils.go +++ b/server/public/model/utils.go @@ -235,7 +235,6 @@ type AppError struct { RequestId string `json:"request_id,omitempty"` // The RequestId that's also set in the header StatusCode int `json:"status_code,omitempty"` // The http status code Where string `json:"-"` // The function where it happened in the form of Struct.Func - IsOAuth bool `json:"is_oauth,omitempty"` // Whether the error is OAuth specific SkipTranslation bool `json:"-"` // Whether translation for the error should be skipped. params map[string]any wrapped error @@ -370,7 +369,6 @@ func NewAppError(where string, id string, params map[string]any, details string, Where: where, DetailedError: details, StatusCode: status, - IsOAuth: false, } ap.Translate(translateFunc) return ap