From 8ad9fb7713c978a59504704450f2e5961e1e3798 Mon Sep 17 00:00:00 2001 From: Pascal Precht <445106+PascalPrecht@users.noreply.github.com> Date: Fri, 4 Nov 2022 08:04:48 +0100 Subject: [PATCH] fix(discord): always emit import error if it's of type error We've been limiting the amount of errors being emitted to clients to reduce payload pressure and also due to the fact that we won't be rendering more than 3 error items in the UI. We want to let actual errors through (as opposed to warnings), even if the limit was reached. --- protocol/discord/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/discord/types.go b/protocol/discord/types.go index 3b6989e00..e8360597f 100644 --- a/protocol/discord/types.go +++ b/protocol/discord/types.go @@ -189,7 +189,7 @@ func (progress *ImportProgress) AddTaskError(task ImportTask, err *ImportError) for i, t := range progress.Tasks { if t.Type == task.String() { errorsAndWarningsCount := progress.Tasks[i].ErrorsCount + progress.Tasks[i].WarningsCount - if errorsAndWarningsCount < MaxTaskErrorItemsCount { + if (errorsAndWarningsCount < MaxTaskErrorItemsCount) || err.Code > WarningType { errors := progress.Tasks[i].Errors progress.Tasks[i].Errors = append(errors, err) }