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

Этот коммит содержится в:
Ben Schumacher
2024-04-02 17:43:23 +02:00
коммит произвёл GitHub
родитель ed58b10486
Коммит d2ce70b4b1
2 изменённых файлов: 0 добавлений и 3 удалений

Просмотреть файл

@@ -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") != "" {

Просмотреть файл

@@ -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