Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error_trace to string representation of an Error #648

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Conversation

seut
Copy link
Member

@seut seut commented Oct 2, 2024

If the error_trace payload is available, add it to the string representation of the Error class.

This way, any layer using the driver, e.g. our SqlAlchemy Dialect, can display the error trace without to handle concrete exceptions. Additionally, handling the concrete exception and reading the self.error_trace variable won't be always possible (e.g. in generic SqlAlchemy abstractions).
If the error_trace is available is already depending on the concrete connect(error_trace=True) attribute and thus in control of the user.

@cla-bot cla-bot bot added the cla-signed label Oct 2, 2024
@seut seut requested a review from amotl October 2, 2024 16:16
If the `error_trace` payload is available, add it to the string
representation of the Error class.
Copy link
Member

@amotl amotl left a comment

Choose a reason for hiding this comment

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

Thank you.

@amotl amotl merged commit d3af228 into master Oct 2, 2024
15 checks passed
@amotl amotl deleted the s/error-trace branch October 2, 2024 17:01
@amotl
Copy link
Member

amotl commented Oct 2, 2024

That other patch validates the improvement on the downstream SQLAlchemy dialect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants