Include header, type and per-field errors in invalid-packet log#128
Merged
erwan-joly merged 1 commit intomasterfrom Apr 22, 2026
Merged
Include header, type and per-field errors in invalid-packet log#128erwan-joly merged 1 commit intomasterfrom
erwan-joly merged 1 commit intomasterfrom
Conversation
Previously logged `null ["Invalid Enum value"]` because outgoing packets don't set Header and ValidationResult renders without member names. Now falls back to [PacketHeader] attr and formats each error as Member=Value: ErrorMessage so the offending packet can be located in trace files.
|
Caution Review failedPull request was closed or merged during review WalkthroughEnhanced packet validation error logging in NetworkClient.cs by adding reflection-based context extraction for header and error details. Updated corresponding localization strings to reflect new placeholder format (header, type, errors). Version bumped to 7.1.0. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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
[PacketHeader]attribute whenpacket.Headeris null (outgoing packets don't set Header).Member=Value: ErrorMessagelines so the broken packet can be located in trace captures.Before:
Sending an invalid packet: null ["Invalid Enum value"]After:
Sending an invalid packet: header=tc_info type=NosCore.Packets.ServerPackets.UI.TcInfoPacket errors=[Sex=99: Invalid Enum value]Test plan
dotnet build -c Releasedotnet test --filter TestCategory!=OPTIONAL-TEST🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Chores