Skip to content

Enhance robustness of data scrubbing with improved error handling#60

Merged
yordadev merged 1 commit intomainfrom
issue-50-fix-test-branch
Jun 13, 2025
Merged

Enhance robustness of data scrubbing with improved error handling#60
yordadev merged 1 commit intomainfrom
issue-50-fix-test-branch

Conversation

@yordadev
Copy link
Member

  • Simplify replacement value logic in ScrubberService::autoSanitize using a ternary operator for better readability.
  • Add try-catch in ScrubberService::autoSanitize to skip invalid regex patterns, preventing loop breaks.
  • Update ScrubberService::patternChecker to safely update content only with non-null results from checkAndSanitize.
  • Standardize nested structure handling in ProcessArrayTrait::processArrayRecursively to use recursive processing consistently.
  • Wrap string sanitization in ProcessArrayTrait::processArrayRecursively with try-catch to skip problematic values.
  • Enhance ProcessArrayTrait::processArray with comprehensive fallbacks for JSON encoding failures, sanitization exceptions, non-string content, and invalid JSON decoding, ensuring an array is always returned.

These changes are attempting to resolve the type exception reported in issue #50

* Simplify replacement value logic in ScrubberService::autoSanitize using a ternary operator for better readability.
* Add try-catch in ScrubberService::autoSanitize to skip invalid regex patterns, preventing loop breaks.
* Update ScrubberService::patternChecker to safely update content only with non-null results from checkAndSanitize.
* Standardize nested structure handling in ProcessArrayTrait::processArrayRecursively to use recursive processing consistently.
* Wrap string sanitization in ProcessArrayTrait::processArrayRecursively with try-catch to skip problematic values.
* Enhance ProcessArrayTrait::processArray with comprehensive fallbacks for JSON encoding failures, sanitization exceptions, non-string content, and invalid JSON decoding, ensuring an array is always returned.

These changes are attempting to resolve the type exception reported in issue #50
@yordadev yordadev added bug Something isn't working enhancement New feature or request labels Jun 11, 2025
@yordadev yordadev self-assigned this Jun 11, 2025
@yordadev yordadev added the request for comments Seeking feedback and discussion around proposed changes. label Jun 11, 2025
@yordadev yordadev marked this pull request as ready for review June 13, 2025 16:01
@yordadev yordadev merged commit 067f5cf into main Jun 13, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request request for comments Seeking feedback and discussion around proposed changes.

Projects

None yet

1 participant