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-10-07 07:59:00 +02:00
2025-10-07 09:30:49 +02:00
2025-10-24 12:16:20 +02:00
2025-09-22 23:16:24 +02:00
2025-10-11 19:29:21 +02:00
2025-07-30 14:13:19 +02:00
2025-07-30 13:44:35 +02:00
2025-07-30 13:44:35 +02:00
2025-07-30 13:44:35 +02:00
2025-09-29 18:51:59 +02:00
2025-09-25 07:51:04 +02:00
2025-10-24 17:19:20 +02:00
2025-07-28 14:15:09 +02:00
2025-10-01 00:01:59 +02:00
2025-09-22 23:16:24 +02:00
2025-07-30 13:44:35 +02:00
2025-07-28 14:15:09 +02:00
2025-08-02 00:42:25 +02:00
2025-08-07 17:57:08 +02:00
2025-10-25 13:19:23 +02:00
2025-10-22 17:58:13 +02:00
2025-10-19 22:52:13 +02:00
2025-10-24 12:16:20 +02:00
2025-10-19 22:52:13 +02:00
2025-09-24 11:40:40 +02:00
2025-10-21 22:43:29 +02:00
2025-10-24 11:40:03 +02:00
2025-09-25 09:41:57 +02:00
2025-09-25 07:51:04 +02:00
2025-10-24 11:40:03 +02:00
2025-07-28 14:15:09 +02:00
2025-07-30 13:44:35 +02:00
2025-07-28 14:15:09 +02:00
2025-09-25 09:17:02 +02:00
2025-09-25 07:51:04 +02:00
2025-07-28 14:15:09 +02:00
2025-10-07 14:37:43 +02:00
2025-09-22 23:16:24 +02:00
2025-09-29 18:09:06 +02:00
2025-10-24 10:47:49 +02:00
2025-10-24 14:17:30 +02:00
2025-10-23 12:24:10 +02:00
2025-08-02 00:42:25 +02:00
2025-10-07 23:03:15 +02:00
2025-10-05 16:05:19 +02:00
2025-09-22 21:05:27 +02:00
2025-09-22 23:16:24 +02:00
2025-08-07 17:57:08 +02:00
2025-08-07 17:57:08 +02:00
2025-10-02 14:46:32 +02:00
2025-09-22 21:05:27 +02:00
2025-10-02 13:02:32 +02:00
2025-07-30 13:44:35 +02:00
2025-10-24 12:16:20 +02:00