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

on error, report which cassette was not found #89

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

marco-m
Copy link
Contributor

@marco-m marco-m commented Feb 25, 2024

Before:

requested cassette not found

After:

requested cassette not found: FILENAME

There is a caveat: this change tries to be as backwards compatible as possible, but, as the change in recorder_test.go shows, it breaks direct (!=) comparison with the sentinel error. On the other hand, one could argue that sentinel errors should always be compared with errors.Is()...

In case you are not comfortable accepting this PR, no problems!

Thanks for go-vcr, everybody I show it to starts using it :-)

Before:

  requested cassette not found

After:

  requested cassette not found: FILENAME

There is a caveat: this change tries to be as backwards compatible as possible,
but, as the change in recorder_test.go shows, it breaks direct (!=) comparison
with the sentinel error. On the other hand, one could argue that sentinel
errors should always be compared with errors.Is().

In case you are not comfortable accepting this PR, no problems!

Thanks for go-vcr, everybody I show it to starts using it :-)
@dnaeon
Copy link
Owner

dnaeon commented Feb 26, 2024

@marco-m , LGTM, thanks!

@dnaeon dnaeon merged commit 89d872b into dnaeon:v3 Feb 26, 2024
2 checks passed
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.69%. Comparing base (6757a75) to head (7ece2ac).
Report is 1 commits behind head on v3.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##               v3      #89   +/-   ##
=======================================
  Coverage   77.69%   77.69%           
=======================================
  Files           1        1           
  Lines         278      278           
=======================================
  Hits          216      216           
  Misses         48       48           
  Partials       14       14           

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

@marco-m marco-m deleted the detailed-error branch February 26, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants