refactor: update validation error handling for zog v0.22#24
Merged
refactor: update validation error handling for zog v0.22#24
Conversation
- Remove deprecated `z.Issues.SanitizeMap()` usage - Use `issue.PathString()` and `issue.Message` directly - Fix field name casing in validation tests to match struct fields - Upgrade Go to 1.24.0 and toolchain to go1.24.3 - Update zog to v0.22.0, echo/v4 to v4.14.0, and testify to v1.11.1 - Add docker/go-units for size unit handling in tests
Member
Author
|
@kody start-review |
This comment has been minimized.
This comment has been minimized.
- Changed validation error filtering from checking path length to checking message length - Root-level errors (empty path) are now properly captured instead of being silently dropped - Added tests for Validate() and ValidateRequest() to verify root-level error handling
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
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.
z.Issues.SanitizeMap()usageissue.PathString()andissue.MessagedirectlyThis pull request primarily refactors the validation error handling to align with updates in
zogv0.22.Key changes include:
zog.Issueobjects to extract validation error paths and messages, removing an intermediate sanitization step and simplifying the error handling logic inRequestContext.ValidateandRequestContext.ValidateRequest.http_test.gonow use thegithub.com/docker/go-unitspackage for better readability and maintainability.git-town.tomlfile has been added to configure Git-Town, standardizing repository workflow settings such as branch naming, hosting type, and sync strategies.