Skip to content

CDRIVER-4499 Set bson_error when hello response is malformed #1129

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

Merged
merged 8 commits into from
Oct 21, 2022

Conversation

galon1
Copy link
Contributor

@galon1 galon1 commented Oct 20, 2022

Before when a type error occurred in mongoc_server_description_handle_hello the program jumped to the failure label and exited without setting an error. Now the failure label sets the error message and code as a type error. There are two different types of failures in mongoc_server_description_handle_hello with different error codes, so the failure label was split into two labels to make it clearer which type of error is occuring.

@galon1 galon1 requested a review from kevinAlbs October 20, 2022 15:12
@galon1 galon1 requested a review from alcaeus October 20, 2022 15:51
Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

LGTM. I'll defer to @kevinAlbs for a final review.

Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

Nicely done. LGTM with two suggested comments.

@galon1 galon1 merged commit b6dad0c into mongodb:master Oct 21, 2022
@galon1 galon1 deleted the CDRIVER-4499 branch October 21, 2022 15:10
kevinAlbs pushed a commit that referenced this pull request Mar 27, 2023
CDRIVER-4499 add bson_set_error to invalid types in handle hello
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