Skip to content

[r1.30] CDRIVER-6019 Improve error messages from Windows APIs (#2020) #2023

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 4 commits into from
May 29, 2025

Conversation

kevinAlbs
Copy link
Collaborator

@kevinAlbs kevinAlbs commented May 28, 2025

Cherry-pick of 1b0e008 to r1.30.

Only bug fixes are expected to be backported. This change is less of a bug fix, but is expected to be needed for CDRIVER-4269 (which is intended to be backported too).

Tested with this patch build: https://spruce.mongodb.com/version/6837a6b2531b1300076b22e3

* add helper to convert Windows error to string: `mongoc_winerr_to_string`

* use SECURITY_STATUS for error message

Improves observed "Incorrect function" error with a more informative "The client and server cannot communicate, because they do not possess a common algorithm."

* use `bson_strerror_r` for consistency between Windows / non-Windows
@kevinAlbs kevinAlbs requested a review from mdb-ad May 28, 2025 20:01
@kevinAlbs kevinAlbs requested a review from a team as a code owner May 28, 2025 20:01
@kevinAlbs kevinAlbs merged commit e206584 into mongodb:r1.30 May 29, 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.

2 participants