1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| 'use strict';
|
| const MONGODB_ERROR_CODES = Object.freeze({
| HostUnreachable: 6,
| HostNotFound: 7,
| NetworkTimeout: 89,
| ShutdownInProgress: 91,
| PrimarySteppedDown: 189,
| ExceededTimeLimit: 262,
| SocketException: 9001,
| NotMaster: 10107,
| InterruptedAtShutdown: 11600,
| InterruptedDueToReplStateChange: 11602,
| NotMasterNoSlaveOk: 13435,
| NotMasterOrSecondary: 13436,
| StaleShardVersion: 63,
| StaleEpoch: 150,
| StaleConfig: 13388,
| RetryChangeStream: 234,
| FailedToSatisfyReadPreference: 133,
| CursorNotFound: 43,
| LegacyNotPrimary: 10058,
| WriteConcernFailed: 64,
| NamespaceNotFound: 26,
| IllegalOperation: 20,
| MaxTimeMSExpired: 50,
| UnknownReplWriteConcern: 79,
| UnsatisfiableWriteConcern: 100,
| DuplicateKey: 11000,
| CannotCreateIndex: 67,
| IndexOptionsConflict: 85,
| IndexKeySpecsConflict: 86,
| InvalidIndexSpecificationOption: 197
| });
|
| module.exports = Object.freeze({ MONGODB_ERROR_CODES });
|
|