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

Re-categorize TypeErrors that arise from create_from_where_filter into InvalidQueryException #817

Merged
merged 4 commits into from
Oct 25, 2023

Conversation

DevonFulcher
Copy link
Contributor

@DevonFulcher DevonFulcher commented Oct 17, 2023

Resolves https://dbt-labs.slack.com/archives/C04TRSFQN75/p1697568904350429 (internal to dbt Labs)

Description

The intent of this PR is to re-categorize TypeErrors that arise from create_from_where_filter into InvalidQueryException. That way, these errors can be caught and handled properly. Additionally, I move the try-catch block for ParseWhereFilterException to be within the body of create_from_where_er that way all call sites can benefit from that catch.

Copy link
Contributor

@tlento tlento left a comment

Choose a reason for hiding this comment

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

Nice, thanks for fixing the error classification on this one!

metricflow/specs/where_filter_transform.py Outdated Show resolved Hide resolved
@DevonFulcher DevonFulcher merged commit 9cd2d09 into main Oct 25, 2023
9 checks passed
@DevonFulcher DevonFulcher deleted the catch_sandbox_type_error branch October 25, 2023 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants