fix: update AirbyteTracedException.__str__ to show user-facing message (AI-Triage PR) by devin-ai-integration[bot] · Pull Request #927 · airbytehq/airbyte-python-cdk
Move the __str__ override from the MessageRepresentationAirbyteTracedErrors subclass into the base AirbyteTracedException class so that str(exception) returns the user-facing message globally, falling back to internal_message. Remove the now-unnecessary MessageRepresentationAirbyteTracedErrors subclass and update the two raise sites in HttpClient to use AirbyteTracedException directly. Co-Authored-By: bot_apk <apk@cognition.ai>
Add 12 tests in TestAirbyteTracedExceptionStr covering: - str() returns user-facing message when both message and internal_message set - str() falls back to internal_message when message is None - str() returns empty string when both are None - str() works in f-strings and %-formatting - args[0] still contains internal_message for backward compat - Subclasses inherit the __str__ override - from_exception() factory method works correctly - Stack trace and internal_message preserved in trace error Co-Authored-By: bot_apk <apk@cognition.ai>
marked this pull request as ready for review
Copilot AI review requested due to automatic review settings
March 4, 2026 00:10Address Copilot review: use explicit 'is not None' checks instead of truthiness so that message='' is respected and does not fall back to internal_message. Add test for this edge case. Co-Authored-By: bot_apk <apk@cognition.ai>
…acedException When wrapping an AirbyteTracedException, from_exception now: - Takes internal_message directly from the original instead of via str(exc) - Preserves the original's user-facing message if the caller doesn't provide one This prevents the user-facing message from being lost or incorrectly assigned to internal_message after the __str__ change. Co-Authored-By: sophie.cui@airbyte.io <sophie.cui@airbyte.io>
sophiecuiy
deleted the
devin/1772482932-fix-traced-exception-str
branch
sophiecuiy added a commit that referenced this pull request
Mar 6, 2026With the `is not None` checks in `AirbyteTracedException.__str__` (PR #927), `message=""` returns an empty string instead of falling back to the detailed `internal_message`. Using `None` lets the fallback work correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration bot added a commit to airbytehq/airbyte that referenced this pull request
Apr 1, 2026…cated MessageRepresentationAirbyteTracedErrors with AirbyteTracedException Replace all imports and usages of the removed MessageRepresentationAirbyteTracedErrors class with the canonical AirbyteTracedException from airbyte_cdk.utils.traced_exception. The class was removed in CDK PR airbytehq/airbyte-python-cdk#927 without a backward-compatible alias, breaking connectors that imported it. Affected connectors: - source-github: source code + unit tests - source-mixpanel: unit tests only - source-linkedin-ads: unit tests only Co-Authored-By: bot_apk <apk@cognition.ai>
This was referenced
Apr 1, 2026This 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