[MM-57415] Removed unused IsOAuth field from AppError (#26578)

This commit is contained in:
Ben Schumacher 2024-04-02 17:43:23 +02:00 committed by GitHub
parent ed58b10486
commit d2ce70b4b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 3 deletions

View File

@ -404,7 +404,6 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
c.Err.WipeDetailed() c.Err.WipeDetailed()
c.Err.StatusCode = 500 c.Err.StatusCode = 500
c.Err.Where = "" 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") != "" { if IsAPICall(c.App, r) || IsWebhookCall(c.App, r) || IsOAuthAPICall(c.App, r) || r.Header.Get("X-Mobile-App") != "" {

View File

@ -235,7 +235,6 @@ type AppError struct {
RequestId string `json:"request_id,omitempty"` // The RequestId that's also set in the header 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 StatusCode int `json:"status_code,omitempty"` // The http status code
Where string `json:"-"` // The function where it happened in the form of Struct.Func 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. SkipTranslation bool `json:"-"` // Whether translation for the error should be skipped.
params map[string]any params map[string]any
wrapped error wrapped error
@ -370,7 +369,6 @@ func NewAppError(where string, id string, params map[string]any, details string,
Where: where, Where: where,
DetailedError: details, DetailedError: details,
StatusCode: status, StatusCode: status,
IsOAuth: false,
} }
ap.Translate(translateFunc) ap.Translate(translateFunc)
return ap return ap