Skip to content

Conversation

@tdeebswihart
Copy link
Contributor

What changed?

This PR adds convenience methods for checking whether an error is the specified service error type.

Why?

It's common for us to check against the type of a service error when dealing with RPC results, but we need to be careful to use errors.Is instead of errors.As.

This adds explicit helpers akin to os.IsNotExist that remove any ambiguity. I found two bugs in one of our code bases in the course of writing this; I'll eliminate them once this has landed

How did you test
N/A

Potential risks
None, as these are not yet in use.

@tdeebswihart tdeebswihart requested review from a team as code owners October 20, 2025 17:40
@tdeebswihart tdeebswihart merged commit 981440d into master Oct 20, 2025
4 checks passed
@tdeebswihart tdeebswihart deleted the is-it-what-i-think-it-is branch October 20, 2025 17:48
tdeebswihart added a commit that referenced this pull request Oct 21, 2025
tdeebswihart added a commit that referenced this pull request Oct 21, 2025
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.

3 participants