czlonkowski
e522aec08c
refactor: Eliminate DRY violation in n8n API response validation (issue #349)
Refactored defensive response validation from PR #367 to eliminate code duplication
and improve maintainability. Extracted duplicated validation logic into reusable
helper method with comprehensive test coverage.
Key improvements:
- Created validateListResponse<T>() helper method (75% code reduction)
- Added JSDoc documentation for backwards compatibility
- Added 29 comprehensive unit tests (100% coverage)
- Enhanced error messages with limited key exposure (max 5 keys)
- Consistent validation across all list operations
Testing:
- All 74 tests passing (including 29 new validation tests)
- TypeScript compilation successful
- Type checking passed
Related: PR #367, code review findings
Files: n8n-api-client.ts (refactored 4 methods), tests (+237 lines)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Conceived by Romuald Członkowski - www.aiadvisors.pl/en
2025-10-25 13:19:23 +02:00
..
2025-07-28 22:45:09 +02:00
2025-10-08 09:43:33 +02:00
2025-07-28 22:45:09 +02:00
2025-07-28 23:25:42 +02:00
2025-06-08 11:07:51 +00:00
2025-07-30 13:44:35 +02:00
2025-10-02 22:28:23 +02:00
2025-07-28 22:45:09 +02:00
2025-10-24 12:40:39 +02:00
2025-07-29 18:09:03 +02:00
2025-10-04 09:30:43 +02:00
2025-10-25 13:19:23 +02:00
2025-09-14 15:42:35 +02:00
2025-07-28 13:05:38 +02:00
2025-07-28 13:05:38 +02:00
2025-06-07 21:12:17 +00:00
2025-06-08 11:07:51 +00:00
2025-06-08 11:07:51 +00:00
2025-07-31 11:48:31 +02:00
2025-07-28 13:05:38 +02:00
2025-07-30 13:44:35 +02:00
2025-07-30 13:44:35 +02:00
2025-07-28 14:15:09 +02:00
2025-06-07 21:12:17 +00:00
2025-06-07 21:12:17 +00:00
2025-06-07 21:12:17 +00:00
2025-06-08 11:07:51 +00:00
2025-06-08 11:07:51 +00:00
2025-06-07 15:57:49 +00:00
2025-06-07 21:12:17 +00:00
2025-06-07 21:12:17 +00:00
2025-07-06 12:35:31 +02:00
2025-06-07 22:11:30 +00:00
2025-06-08 11:07:51 +00:00
2025-06-08 11:07:51 +00:00
2025-06-08 11:07:51 +00:00
2025-06-07 22:11:30 +00:00
2025-06-07 21:12:17 +00:00
2025-06-07 21:12:17 +00:00