[text-auditor] Fix misleading alter-field processor runtime error text
- 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
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