Skip to content

Bug Report: Misleading Error Message in ContentTooLongException #1238

@raynigon

Description

@raynigon

Java API client version

9.4

Java version

17

Elasticsearch Version

9.4

Problem description

When an incoming data stream exceeds the configured maximum buffer limit, the application throws a ContentTooLongException. However, the error message incorrectly reports the size of the current incoming data chunk (src.limit()) instead of the total accumulated content length.

This results in a highly confusing error message for users and developers, as the reported "too long" content size often appears to be significantly smaller than the configured buffer limit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions