[MM-55595] Use annotated logger in search layer (#25468)

Этот коммит содержится в:
Ben Schumacher
2023-12-04 18:34:57 +01:00
коммит произвёл GitHub
родитель 5a4dba8809
Коммит b2ec1ff8ae
130 изменённых файлов: 2107 добавлений и 1930 удалений

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

@@ -170,7 +170,7 @@ func (a *App) tryExecutePluginCommand(c request.CTX, args *model.CommandArgs) (*
// This is a response from the plugin, which may set an incorrect status code;
// e.g setting a status code of 0 will crash the server. So we always bucket everything under 500.
if appErr != nil && (appErr.StatusCode < 100 || appErr.StatusCode > 999) {
mlog.Warn("Invalid status code returned from plugin. Converting to internal server error.", mlog.String("plugin_id", matched.PluginId), mlog.Int("status_code", appErr.StatusCode))
c.Logger().Warn("Invalid status code returned from plugin. Converting to internal server error.", mlog.String("plugin_id", matched.PluginId), mlog.Int("status_code", appErr.StatusCode))
appErr.StatusCode = http.StatusInternalServerError
}