-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
- Expected behaviour
391 - Reauthenticate is handled within the driver by reauthenticating the user.
##Ā
391 - Reauthenticate error is thrown sometimes. We see this error in Compass, as reported by https://jira.mongodb.org/browse/HELP-83883.
We were also able to reproduce this error with a 8.2-enterprise mongo server and a simple oidc flow.
Digging a bit deeper, the problem is caused by the error code sometimes being an Int32 instead of a primitive value.Ā
This goes againstĀ MongoError type definition, which uses primitive types (string | number | undefinedĀ for codeĀ ).
And it lead to this check failing to catch theĀ 391Ā as intended:
node-mongodb-native/src/sdam/server.ts
Line 359 inĀ 2512137
| operationError.code === MONGODB_ERROR_CODES.Reauthenticate |
.