Skip to content

output: treat JSON::GeneratorError as unrecoverable error#5419

Merged
kenhys merged 1 commit into
fluent:masterfrom
Watson1978:unrecoverable-error
Jul 9, 2026
Merged

output: treat JSON::GeneratorError as unrecoverable error#5419
kenhys merged 1 commit into
fluent:masterfrom
Watson1978:unrecoverable-error

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:
Fixes #5414

What this PR does / why we need it:
When JSON generation fails for content reasons (e.g. non-UTF-8 bytes, NaN/Infinity), JSON.generate raises JSON::GeneratorError.
This is deterministic for a given chunk, so retrying can never succeed and the chunk should be treated as a bad chunk.

Docs Changes:
N/A

Release Note:

  • output: treat JSON::GeneratorError as unrecoverable error

When JSON generation fails for content reasons (e.g. non-UTF-8 bytes,
NaN/Infinity), `JSON.generate` raises `JSON::GeneratorError`. This is
deterministic for a given chunk, so retrying can never succeed and the
chunk should be treated as a bad chunk.

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978 Watson1978 requested a review from kenhys July 9, 2026 03:00
@Watson1978 Watson1978 added the backport to v1.19 We will backport this fix to the LTS branch label Jul 9, 2026
@Watson1978 Watson1978 added this to the v1.20.0 milestone Jul 9, 2026
@kenhys kenhys merged commit e92968e into fluent:master Jul 9, 2026
24 checks passed
@Watson1978 Watson1978 deleted the unrecoverable-error branch July 9, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport to v1.19 We will backport this fix to the LTS branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON::GeneratorError should be added to UNRECOVERABLE_ERRORS

2 participants