elastic / elastic/beats

[text-auditor] Fix misleading alter-field processor runtime error text

Open Beginner friendly
#52,858 1 comment 0 reactions 0 assignees View on GitHub
needs_team
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 2h
Merged PRs (30d)
364

Description

## Text Improvements

The following user-facing runtime error text issues were found in `libbeat/processors/actions/alterFieldProcessor.go`. Both are low-effort fixes in adjacent code.

### 1. Contradictory failure wording in alter error

**File:** `libbeat/processors/actions/alterFieldProcessor.go` (line 162)
**Current text:** `"could not alter %s successfully, %w"`
**Suggested fix:** `"could not alter %s: %w"`
**Why:** This is a failure path, so `could not ... successfully` is self-contradictory and confusing in user-facing output.

### 2. Error says "delete key" but prints field value

**File:** `libbeat/processors/actions/alterFieldProcessor.go` (line 157)
**Current text:** `return fmt.Errorf("could not delete key: %s, %w", v, err)`
**Suggested fix:** keep message intent but pass `valueKey` instead of `v` (or change message to explicitly say value).
**Why:** The message claims key deletion but interpolates the field value (`v`), which is misleading for users troubleshooting processor failures.

## Suggested Actions

- [ ] Update line 162 wording to remove contradictory `successfully` phrase from the failure message.
- [ ] Update line 157 to align placeholder data with message intent (use `valueKey`, or rename the message to `value`).

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Text Auditor](https://github.com/elastic/beats/actions/runs/32973887054)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
> - [x] expires on Sep 2, 2026, 1:32 PM UTC

Contributor guide

Open the contributing guide

Research direction

Start in libbeat/processors/actions/alterFieldProcessor.go at the error paths around lines 157 and 162. Align the delete-key value with the message and remove the contradictory wording, then verify both user-facing errors accurately describe the failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.