Skip to content

Conversation

jtagcat
Copy link
Contributor

@jtagcat jtagcat commented Oct 25, 2022

+ gofmt

To get string, .Error() can be called on error.

ServerHeartbeatFailedEvent.Failure is already of type error.

Background & Motivation

I wanted to use error value. Couldn't. ServerHeartbeatFailedEvent.Failure already uses error.

+ gofmt

To get string, .Error() can be called on error.

ServerHeartbeatFailedEvent.Failure is already of type error.
@jtagcat
Copy link
Contributor Author

jtagcat commented Oct 25, 2022

OK make fmt
OK make lint
make test: go.mongodb.org/mongo-driver/mongo/integration/unified: no such command: 'configureFailPoint'
(make test fails on master with same result)
make test-race: same result as make test

With docker run -p 127.0.0.1:27017:27017 mongo

@matthewdale
Copy link
Collaborator

@jtagcat thanks for the PR and the proposed improvement! I agree that the CommandFailedEvent.Failure field should be an error instead of a string. However, changing that API would break our v1.x compatibility guarantee, so is not a change we can make currently.

I've created GODRIVER-2616 based on your proposed improvement and scheduled it for inclusion in the v2.0 Go Driver. For now I'm closing this PR. We will be welcoming PRs for the v2.0 Go Driver once that implementation is in-progress (please watch GODRIVER-1787 for updates)!

@jtagcat jtagcat deleted the eventCommandFailedErr branch October 27, 2022 12:59
@jtagcat jtagcat restored the eventCommandFailedErr branch October 27, 2022 12:59
@jtagcat
Copy link
Contributor Author

jtagcat commented Oct 27, 2022

I subscribed to the Jira issue. I'm not sure whether Jira will send me notifications. I did not get any welcome e-mail, nor can I access any user settings to check notification method; all menus are white, persists with no blockers. If I'm needed, use e-mail or GitHub notifications.

image

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