THRIFT-6006: Implement MESSAGE_SIZE_LIMIT exception type for Haxe library#3485
Merged
Conversation
…rary Client: haxe - Add CORRUPTED_DATA = 5 and MESSAGE_SIZE_LIMIT = 6 to TTransportException - Replace END_OF_FILE throws with MESSAGE_SIZE_LIMIT in TEndpointTransport for ResetConsumedMessageSize, CheckReadBytesAvailable, CountConsumedMessageBytes - Improve error messages to include the configured limit and actual byte counts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the
MESSAGE_SIZE_LIMITtransport exception type for the Haxe library, analogous to the Java fix in THRIFT-5858 / PR #3115.Problem: When a transport reads more bytes than the configured maximum message size, it threw a
TTransportExceptionwith typeEND_OF_FILE. This makes debugging difficult — servers swallow the exception silently and clients only see "socket closed by peer", with no indication that a message size limit was exceeded.Changes:
TTransportException.hx: AddCORRUPTED_DATA = 5andMESSAGE_SIZE_LIMIT = 6constants (matching Java values for cross-language consistency)TEndpointTransport.hx: ReplaceEND_OF_FILEthrows withMESSAGE_SIZE_LIMITinResetConsumedMessageSize,CheckReadBytesAvailable, andCountConsumedMessageBytes; improve error messages to include the configured limit and actual byte countsTest plan
MESSAGE_SIZE_LIMIT(6) when message size limit is exceededSubtask of THRIFT-5858 — tracked as THRIFT-6006.
🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com