wrap errors correctly

This commit is contained in:
2026-07-07 09:34:36 +02:00
parent 24038e36f7
commit 2f77c27715
22 changed files with 95 additions and 94 deletions

View File

@@ -32,7 +32,7 @@ func TaskList(conf *cfg.Config) error {
Do(context.Background())
if err != nil {
return fmt.Errorf("failed to get index templates: %s", esErrorString(err))
return fmt.Errorf("failed to get index templates: %w", esErrorString(err))
}
slog.Debug("res", "tasks", res)
@@ -68,7 +68,7 @@ func TaskCancel(conf *cfg.Config, taskid string) error {
Do(context.Background())
if err != nil {
return fmt.Errorf("failed to cancel task: %s", esErrorString(err))
return fmt.Errorf("failed to cancel task: %w", esErrorString(err))
}
return nil