Skip to content

fix: add fallback on non hashable errors#1113

Merged
giortzisg merged 1 commit intomasterfrom
fix-error-cmp
Oct 21, 2025
Merged

fix: add fallback on non hashable errors#1113
giortzisg merged 1 commit intomasterfrom
fix-error-cmp

Conversation

@giortzisg
Copy link
Contributor

Description

When checking for infinite recursion, there is a possibility that the error will be non comparable. In those cases we need to add a fallback to compare the error type and message to avoid panicking.

Issues

@giortzisg giortzisg requested a review from lcian October 21, 2025 10:49
@giortzisg giortzisg self-assigned this Oct 21, 2025
@giortzisg giortzisg added the Bug Issue type label Oct 21, 2025
@linear
Copy link

linear bot commented Oct 21, 2025

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.87%. Comparing base (2cf1dc0) to head (d20ebe1).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
exception.go 75.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1113      +/-   ##
==========================================
- Coverage   87.01%   86.87%   -0.14%     
==========================================
  Files          56       57       +1     
  Lines        6130     6150      +20     
==========================================
+ Hits         5334     5343       +9     
- Misses        649      657       +8     
- Partials      147      150       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@lcian lcian left a comment

Choose a reason for hiding this comment

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

It's unfortunate that we have to use reflection but it seems there's no better way to do this.

@giortzisg giortzisg merged commit 11f2790 into master Oct 21, 2025
17 of 18 checks passed
@giortzisg giortzisg deleted the fix-error-cmp branch October 21, 2025 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Issue type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: runtime error: hash of unhashable type mongo.CommandError

3 participants