feat : add specific error for connection target#104
Merged
Conversation
Preview build readyBinaries for commit 84b34a3 are available at:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces explicit backend attribution for connection-related errors in the
mongo2pgCLI tool, improving error diagnostics for MongoDB, PostgreSQL, and Kafka. The changes ensure that user-facing error messages and runtime logs consistently identify which backend failed and in what operation context, while preserving the original error details for troubleshooting. This enhancement covers all major command paths and updates both error handling and logging.Connection error attribution and diagnostics:
connection_failed_contextinsrc/bin/mongo2pg.rsto generate standardized error context strings for connection failures, specifying backend and operation.infer,export,import,report,kafka-import) to wrap errors with explicit backend attribution using the new helper andanyhow::Context. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Specification and requirements:
connection-error-attributionandruntime-log-format, defining requirements for backend-specific error attribution, root cause preservation, and consistent log formatting. [1] [2] [3] [4]design.mdandproposal.mdfor the new error attribution approach. [1] [2]Verification and tasks:
Metadata:
These changes make it much easier for users and operators to quickly identify which backend failed and why, reducing troubleshooting time and improving reliability.