Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/cli/src/cli/processor/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export function createBasicTranslator(

const result = _.merge({}, ...subResults);

try {
onProgress(100, {}, result);
} catch {}
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The empty catch block silently swallows any errors from onProgress, making debugging difficult. Consider at least logging the error:

try {
  onProgress(100, {}, result);
} catch (error) {
  console.error('Error during progress update:', error);
}

This will help identify issues while still preventing the error from breaking the translation flow.

Suggested change
} catch {}
} catch (error) {
console.error('Error during progress update:', error);
}

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +32
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling is inconsistent - the onProgress call at line 25 (inside the loop) doesn't have error handling, but this final call at line 31 does. Consider applying the same error handling pattern to both locations for consistency. If errors in progress callbacks could occur during chunk processing, they should also be handled there.

Copilot uses AI. Check for mistakes.

return result;
};

Expand Down
Loading