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

preserve internal error #646

Merged
merged 1 commit into from
Aug 16, 2024
Merged

preserve internal error #646

merged 1 commit into from
Aug 16, 2024

Conversation

tpolecat
Copy link
Member

We ran into an issue where an internal error in SqlCursor.field "expected exactly one row (or something like that)" was masked by orElse selecting the generic mkCursorForField, which then failed with "Unhandled mapping of type grackle.sql.SqlMappingLike$SqlField", which is misleading. This PR fixes the specific issue, but I think in general we may want a combinator like r1 onFailure r2 that only selects r2 in the case of logical failure, preserving r1 as-is in case of InternalError.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.62%. Comparing base (3a6b7b8) to head (adc3c07).
Report is 75 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #646      +/-   ##
==========================================
+ Coverage   74.22%   75.62%   +1.39%     
==========================================
  Files          32       32              
  Lines        4609     5033     +424     
  Branches     1025     1083      +58     
==========================================
+ Hits         3421     3806     +385     
- Misses       1188     1227      +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@milessabin milessabin self-requested a review August 16, 2024 17:56
@milessabin milessabin self-assigned this Aug 16, 2024
@milessabin milessabin added the bug Something isn't working label Aug 16, 2024
Copy link
Member

@milessabin milessabin left a comment

Choose a reason for hiding this comment

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

LGTM!

@milessabin milessabin merged commit 3b6f41b into main Aug 16, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants