Enhance error logging and preservation#14
Conversation
- Updated all custom error classes to support the 'cause' property in constructors. - Refactored catch blocks to rename '_error' to 'error' and preserve the original error object. - Enhanced logger.error to use node:util.inspect for full stack trace and nested error visibility. - Updated calls to logger.error/warn to pass the error object as a second argument. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Updated all custom error classes to support the 'cause' property in constructors. - Refactored catch blocks to rename '_error' to 'error' and preserve the original error object. - Enhanced logger.error to use node:util.inspect for full stack trace and nested error visibility. - Updated calls to logger.error/warn to pass the error object as a second argument. - Restored original Zod schemas in conversation-extractor.ts while keeping the error handling improvements. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
…e parity - Updated all custom error classes to support the 'cause' property in constructors. - Refactored catch blocks to rename '_error' to 'error' and preserve the original error object. - Enhanced logger.error to use node:util.inspect for full stack trace and nested error visibility. - Updated calls to logger.error/warn to pass the error object as a second argument. - Restored original Zod schemas and extraction logic in conversation-extractor.ts. - Restored original metadata extraction and batch indexing logic in vector-store.ts. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Updated all custom error classes to support the 'cause' property in constructors. - Refactored catch blocks to preserve original error objects and rename '_error' to 'error'. - Enhanced logger.error to use node:util.inspect for full stack trace and nested error visibility. - Added 'find-circular-refs' (madge) and 'find-dead-code' (knip) to package.json. - Restored original feature logic in conversation-extractor.ts and vector-store.ts while keeping error handling improvements. - Fixed unused SearchMode export by using it in repl/commands.ts. - Verified build and formatted code. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Updated all custom error classes to support the 'cause' property for better error chaining. - Standardized catch blocks: renamed variables to 'error' and extracted 'errorMessage' to avoid inline type checks in template literals. - Enhanced logger to display full stack traces and nested causes using node:util.inspect. - Added 'madge' for circular dependency detection and 'knip' for dead code analysis. - Restored original feature logic in conversation-extractor.ts and vector-store.ts while maintaining new error handling standards. - Fixed type usage for SearchMode in repl/commands.ts. - Verified build and formatting. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
…y tools - Standardized error preservation using the 'cause' property in all custom error classes. - Refactored catch blocks: renamed variables to 'error', extracted 'errorMessage' to avoid inline type checks in template literals, and ensured full error objects are passed to the logger. - Enhanced logger.error to use node:util.inspect for full stack trace and nested cause visibility. - Correctly separated dependencies (runtime) from devDependencies in package.json. - Integrated 'madge' for circular dependency detection and 'knip' for dead code analysis. - Addressed initial dead code/type usage findings. - Verified build and formatting. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Standardized error preservation using the 'cause' property in all custom error classes. - Refactored catch blocks: renamed variables to 'error', extracted 'errorMessage' to avoid inline type checks in template literals, and ensured full error objects are passed to the logger. - Enhanced logger.error and logger.warn to use node:util.inspect for full stack trace and nested cause visibility. - Correctly separated dependencies (runtime) from devDependencies in package.json. - Integrated 'madge' for circular dependency detection and 'knip' for dead code analysis. - Restored original feature logic in conversation-extractor.ts and vector-store.ts while maintaining new error handling standards. - Verified build, formatting, and tests (including playwright browser installation). Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
…egorization - Standardized error preservation using the 'cause' property across all custom error classes. - Refactored all catch blocks to rename variables to 'error' and ensure the original error is preserved during re-throws or logging. - Pre-extracted 'errorMessage' in catch blocks to eliminate inline type checks within template literals. - Enhanced logger to provide high-visibility diagnostic information (stack traces, nested causes) using node:util.inspect. - Organized package.json: separated runtime dependencies from development tools. - Integrated 'find-circular-refs' (madge) and 'find-dead-code' (knip) for ongoing architectural health. - Verified system integrity with pnpm build, format, and test suites. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Comprehensive standardization of error preservation using the 'cause' property. - Enhanced logger for high-fidelity diagnostics (colorized stack traces and nested causes). - Pre-extracted 'errorMessage' in catch blocks for cleaner template literals. - Organized dependencies and integrated 'madge' and 'knip' for architectural health. - Created 'ERROR_HANDLING.md' to document the diagnostic philosophy and resilience patterns. - Integrated error handling documentation into the README and TOC generation. - Verified system integrity with build, format, and full test suite. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
…ality tools - Standardized error preservation using the 'cause' property in all custom error classes. - Refactored catch blocks: renamed variables to 'error', extracted 'errorMessage' to avoid inline type checks in template literals, and ensured full error objects are passed to the logger. - Enhanced logger.error and logger.warn to use node:util.inspect for full stack trace and nested cause visibility. - Correctly separated dependencies (runtime) from devDependencies in package.json. - Integrated 'madge' for circular dependency detection and 'knip' for dead code analysis. - Created 'ERROR_HANDLING.md' to document the diagnostic philosophy and resilience patterns. - Verified build, formatting, and tests. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Implemented centralized Error Bus (Pub/Sub pattern) in src/utils/error-bus.ts. - Subscribed logger to the Error Bus for unified, high-fidelity diagnostic reporting. - Refactored all catch blocks to use errorBus.raise (re-throws) or errorBus.report (non-fatal). - Simplified all custom Error classes by removing ErrorOptions/cause boilerplates. - Properly separated production dependencies from devDependencies in package.json. - Integrated 'madge' for circular dependency detection and 'knip' for dead code analysis. - Created ERROR_HANDLING.md documentation for the new simplified architecture. - Verified system integrity with pnpm build, format, and test suites. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Implemented centralized Error Bus (Pub/Sub pattern) in src/utils/error-bus.ts. - Simplified custom error classes and catch blocks across the entire codebase. - Subscribed logger to Error Bus for high-fidelity, colorized diagnostic output. - Fixed infinite loop bug in chunkMarkdown utility and verified with tests. - Updated ARCH.md, README.md, and created ERROR_HANDLING.md. - Verified system-wide with pnpm build, format, and test. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Implemented centralized Error Bus (Pub/Sub) in src/utils/error-bus.ts. - Decoupled logger from operational logic by subscribing it to the Error Bus. - Simplified custom Error classes (removed ErrorOptions/cause boilerplate). - Refactored Batch 1 (Search & AI layers) to utilize the Error Bus. - Created ERROR_HANDLING_PLAN.md with progress checklist. - Verified with build, format, and tests. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Refactored all scraper-related components (Browser, Workers, Discovery) to use the Error Bus. - Simplified custom error classes and standardized catch blocks. - Improved resilience logging by passing full error context to the bus during retries. - Updated ERROR_HANDLING_PLAN.md checklist. - Verified system integrity with pnpm build and tests. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Finalized migration of CLI components (Repl, CommandHandler) and utilities. - Integrated ripgrep search (RgSearch) into the Error Bus architecture. - Cleaned up redundant error message extractions across the entire codebase. - Enhanced logger for unified, high-fidelity diagnostic reporting. - Updated ERROR_HANDLING_PLAN.md to reflect full completion. - Verified system-wide with build, format, and tests. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
This change ensures that error details are no longer "silenced" or lost when being caught and re-thrown or logged. It standardizes error preservation using the 'cause' property and improves developer visibility by logging full stack traces and nested error structures in the console.
PR created automatically by Jules for task 7180191078301869968 started by @simwai