-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
2
-
None
-
None
-
None
-
None
-
None
-
None
-
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 |
.
- causes
-
COMPASS-10039 Reauthentication for expired tokens is not handled graciously
-
- Needs Triage
-
- is duplicated by
-
NODE-7289 node-mongodb-native - PR #4783: fix: deserialize error with promoteValues
-
- Closed
-
- is related to
-
NODE-7279 Throw reauthentication error, not 391 error, during OIDC reauthentication
-
- Backlog
-