Skip to content

fix: copy paste log on write errors not always shown#484

Merged
tnaum-ms merged 6 commits intonextfrom
dev/tnaum/copy-paste-log-errors-on-write-errors
Feb 3, 2026
Merged

fix: copy paste log on write errors not always shown#484
tnaum-ms merged 6 commits intonextfrom
dev/tnaum/copy-paste-log-errors-on-write-errors

Conversation

@tnaum-ms
Copy link
Collaborator

@tnaum-ms tnaum-ms commented Feb 3, 2026

Pull Request Description

Summary

This pull request addresses issues with error visibility during paste operations, particularly for duplicate key violations on unique indexes. The changes ensure that error details are logged appropriately, improving the debugging experience for users.

Changes Made

1. DocumentDbStreamingWriter.ts

  • Skip Strategy:
    • Updated logging to differentiate between _id conflicts and unique index violations.
    • Added detailed error messages to provide more context for duplicate key violations.
  • Abort Strategy:
    • Enhanced error logging to include detailed messages for write errors.

2. taskService.ts

  • Updated task failure logging to use the error() method.
  • Automatically reveal the output channel when a task fails, ensuring users can see error details immediately.

Verification

  • Builds: Verified changes by running npm run build.
  • Localization: Updated localization files using npm run l10n.
  • Testing: Ensured no regressions by running existing test suites.

Impact

These changes improve the visibility of errors during paste operations, making it easier for users to debug issues related to duplicate key violations. The updates also enhance the overall user experience by ensuring critical error details are not missed.

Related Issues

@tnaum-ms tnaum-ms added this to the 0.7.0 - January 2025 milestone Feb 3, 2026
@tnaum-ms tnaum-ms marked this pull request as ready for review February 3, 2026 14:14
@tnaum-ms tnaum-ms requested a review from a team as a code owner February 3, 2026 14:14
Copilot AI review requested due to automatic review settings February 3, 2026 14:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request improves error visibility during paste operations by enhancing logging for duplicate key violations and ensuring users can immediately see error details in the output channel.

Changes:

  • Enhanced error logging in skip and abort strategies to include MongoDB error details (e.g., which unique index caused the violation)
  • Changed logging from debug/trace to warn/error levels for better visibility
  • Automatically reveals the output channel when a task fails
  • Updated localization strings to be more descriptive and context-aware

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/services/taskService/data-api/writers/DocumentDbStreamingWriter.ts Enhanced error logging for skip and abort strategies with detailed MongoDB error messages; changed log levels from debug/trace to warn/error for better visibility
src/services/taskService/taskService.ts Changed task failure logging to use error() method and automatically reveal output channel
l10n/bundle.l10n.json Updated localization strings with more descriptive messages for skip and abort strategies; removed outdated strings

@tnaum-ms tnaum-ms merged commit 0e4baea into next Feb 3, 2026
8 checks passed
@tnaum-ms tnaum-ms deleted the dev/tnaum/copy-paste-log-errors-on-write-errors branch February 3, 2026 16:41
@tnaum-ms tnaum-ms mentioned this pull request Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants