Files
Profa 2273bf4bd0 fix(mcp): improve null/undefined handling in validateRequired
Improved BaseHandler.validateRequired() method:
- Properly handle null arguments (typeof null === 'object' in JS)
- Check for null, undefined, and array types explicitly
- Allow falsy but defined values (0, false) as valid
- Provide better error messages distinguishing null vs undefined

Updated tests to match new validation behavior:
- Changed null/undefined tests to expect rejections
- Tests now validate that proper error messages are thrown
- Maintains support for falsy but defined values

This fixes some MCP unit test failures but more work needed.

Remaining issues: 159 failed, 245 passed (from 404 total tests)
- Some tests expect wrapped error responses vs thrown errors
- Integration tests may have additional issues
- Test organization and mocking strategies need review
2025-10-30 20:12:01 +00:00
..