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

GODRIVER-2603 Use errors.Is/As for IsTimeout and IsDuplicateKeyError. #1371

Merged

Conversation

matthewdale
Copy link
Collaborator

GODRIVER-2603

Summary

Use errors.Is/As in mongo.IsTimeout and mongo.IsDuplicateKeyError.

Background & Motivation

As we add more error wrapping inside the Go driver, error checking code that doesn't unwrap errors will start breaking. This came up as I was implementing GODRIVER-2579. Subsequent PRs will handle wrapped errors in additional Go driver code.

@matthewdale matthewdale requested a review from a team as a code owner August 31, 2023 22:13
@matthewdale matthewdale requested review from qingyang-hu and removed request for a team August 31, 2023 22:13
@matthewdale matthewdale temporarily deployed to api-report August 31, 2023 22:13 — with GitHub Actions Inactive
@github-actions
Copy link

API Change Report

No changes found!

Copy link
Collaborator

@qingyang-hu qingyang-hu left a comment

Choose a reason for hiding this comment

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

LGTM!

@matthewdale matthewdale merged commit b191b72 into mongodb:master Sep 8, 2023
17 of 21 checks passed
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.

2 participants