Skip to content

Add ErrorContains checker#319

Closed
thespags wants to merge 2 commits into
Antonboom:masterfrom
thespags:add-error-contains
Closed

Add ErrorContains checker#319
thespags wants to merge 2 commits into
Antonboom:masterfrom
thespags:add-error-contains

Conversation

@thespags

Copy link
Copy Markdown

Another case of users using require.Contains(t, err.Error, ...) instead of the built in testify require.ErrorContains(t, err, ...)

@Antonboom Antonboom added the duplicate This issue or pull request already exists label Jun 22, 2026
@Antonboom

Copy link
Copy Markdown
Owner

Duplicate of #294

@Antonboom Antonboom marked this as a duplicate of #294 Jun 22, 2026
@Antonboom Antonboom closed this Jun 22, 2026
@thespags

Copy link
Copy Markdown
Author

Thanks @Antonboom that MR is much more complete. Do you know when you'll have a chance to review it?

@Antonboom

Antonboom commented Jun 22, 2026

Copy link
Copy Markdown
Owner

I will review and take into accounts all MRs, but in milestones order.

If you have some proofs, that ErrorContains is really useful, I can think to include it in the nearest release

from my PoV, and Contains and ErrorContanis are not proper way to handle error, so we should not suggest any of these

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

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants