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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
|
# Group related errors into categories,can be checked against ErrorCodes::isXXXClassName methods.
error_categories:
- NetworkError
- Interruption
# isNotMasterError() includes all codes that indicate that the node that received the request
# was not master at some point during command processing,regardless of whether some write may
# have happened. If you care about whether a write could have happened,check for individual
# codes.
- NotMasterError
- StaleShardVersionError
- NeedRetargettingError
- WriteConcernError
- ShutdownError
# isCancelationError() includes all codes that,when passed to a function as its parameter
# indicates that it cannot be executed as normal and must abort its intended work.
- CancelationError
- ConnectionFatalMessageParseError
- ExceededTimeLimitError
- SnapshotError
- VoteAbortError
- NonResumableChangeStreamError
- RetriableError
error_codes:
- {code: 0,name: OK}
- {code: 1,name: InternalError}
- {code: 2,name: BadValue}
- {code: 3,name: OBSOLETE_DuplicateKey}
- {code: 4,name: NoSuchKey}
- {code: 5,name: GraphContainsCycle}
- {code: 6,name: HostUnreachable,categories: [NetworkError,RetriableError]}
- {code: 7,name: HostNotFound,categories: [NetworkError,RetriableError]}
- {code: 8,name: UnknownError}
- {code: 9,name: FailedToParse}
- {code: 10,name: CannotMutateObject}
- {code: 11,name: UserNotFound}
- {code: 12,name: UnsupportedFormat}
- {code: 13,name: Unauthorized}
- {code: 14,name: TypeMismatch}
- {code: 15,name: Overflow}
- {code: 16,name: InvalidLength}
- {code: 17,name: ProtocolError}
- {code: 18,name: AuthenticationFailed}
- {code: 19,name: CannotReuseObject}
- {code: 20,name: IllegalOperation}
- {code: 21,name: EmptyArrayOperation}
- {code: 22,name: InvalidBSON}
- {code: 23,name: AlreadyInitialized}
- {code: 24,name: LockTimeout,categories: [Interruption]}
- {code: 25,name: RemoteValidationError}
- {code: 26,name: NamespaceNotFound}
- {code: 27,name: IndexNotFound}
- {code: 28,name: PathNotViable}
- {code: 29,name: NonExistentPath}
- {code: 30,name: InvalidPath}
- {code: 31,name: RoleNotFound}
- {code: 32,name: RolesNotRelated}
- {code: 33,name: PrivilegeNotFound}
- {code: 34,name: CannotBackfillArray}
- {code: 35,name: UserModificationFailed}
- {code: 36,name: RemoteChangeDetected}
- {code: 37,name: FileRenameFailed}
- {code: 38,name: FileNotOpen}
- {code: 39,name: FileStreamFailed}
- {code: 40,name: ConflictingUpdateOperators}
- {code: 41,name: FileAlreadyOpen}
- {code: 42,name: LogWriteFailed}
- {code: 43,name: CursorNotFound}
- {code: 45,name: UserDataInconsistent}
- {code: 46,name: LockBusy}
- {code: 47,name: NoMatchingDocument}
- {code: 48,name: NamespaceExists}
- {code: 49,name: InvalidRoleModification}
- {code: 50,name: MaxTimeMSExpired,categories: [Interruption,ExceededTimeLimitError]}
- {code: 51,name: ManualInterventionRequired}
- {code: 52,name: DollarPrefixedFieldName}
- {code: 53,name: InvalidIdField}
- {code: 54,name: NotSingleValueField}
- {code: 55,name: InvalidDBRef}
- {code: 56,name: EmptyFieldName}
- {code: 57,name: DottedFieldName}
- {code: 58,name: RoleModificationFailed}
- {code: 59,name: CommandNotFound}
- {code: 60,name: OBSOLETE_DatabaseNotFound}
- {code: 61,name: ShardKeyNotFound}
- {code: 62,name: OplogOperationUnsupported}
- {code: 63,name: StaleShardVersion,categories: [StaleShardVersionError,NeedRetargettingError]}
- {code: 64,name: WriteConcernFailed,categories: [WriteConcernError]}
- {code: 65,name: MultipleErrorsOccurred}
- {code: 66,name: ImmutableField}
- {code: 67,name: CannotCreateIndex}
- {code: 68,name: IndexAlreadyExists}
- {code: 69,name: AuthSchemaIncompatible}
- {code: 70,name: ShardNotFound}
- {code: 71,name: ReplicaSetNotFound}
- {code: 72,name: InvalidOptions}
- {code: 73,name: InvalidNamespace}
- {code: 74,name: NodeNotFound}
- {code: 75,name: WriteConcernLegacyOK,categories: [WriteConcernError]}
- {code: 76,name: NoReplicationEnabled}
- {code: 77,name: OperationIncomplete}
- {code: 78,name: CommandResultSchemaViolation}
- {code: 79,name: UnknownReplWriteConcern,categories: [WriteConcernError]}
- {code: 80,name: RoleDataInconsistent}
- {code: 81,name: NoMatchParseContext}
- {code: 82,name: NoProgressMade}
- {code: 83,name: RemoteResultsUnavailable}
- {code: 84,name: DuplicateKeyValue}
- {code: 85,name: IndexOptionsConflict}
- {code: 86,name: IndexKeySpecsConflict}
- {code: 87,name: CannotSplit}
- {code: 88,name: SplitFailed_OBSOLETE}
- {code: 89,name: NetworkTimeout,categories: [NetworkError,RetriableError]}
- {code: 90,name: CallbackCanceled,categories: [CancelationError]}
- {code: 91,name: ShutdownInProgress,categories: [ShutdownError,CancelationError,RetriableError]}
- {code: 92,name: SecondaryAheadOfPrimary}
- {code: 93,name: InvalidReplicaSetConfig}
- {code: 94,name: NotYetInitialized}
- {code: 95,name: NotSecondary}
- {code: 96,name: OperationFailed}
- {code: 97,name: NoProjectionFound}
- {code: 98,name: DBPathInUse}
- {code: 100,name: UnsatisfiableWriteConcern,categories: [WriteConcernError]}
- {code: 101,name: OutdatedClient}
- {code: 102,name: IncompatibleAuditMetadata}
- {code: 103,name: NewReplicaSetConfigurationIncompatible}
- {code: 104,name: NodeNotElectable}
- {code: 105,name: IncompatibleShardingMetadata}
- {code: 106,name: DistributedClockSkewed}
- {code: 107,name: LockFailed}
- {code: 108,name: InconsistentReplicaSetNames}
- {code: 109,name: ConfigurationInProgress}
- {code: 110,name: CannotInitializeNodeWithData}
- {code: 111,name: NotExactValueField}
- {code: 112,name: WriteConflict}
- {code: 113,name: InitialSyncFailure}
- {code: 114,name: InitialSyncOplogSourceMissing}
- {code: 115,name: CommandNotSupported}
- {code: 116,name: DocTooLargeForCapped}
- {code: 117,name: ConflictingOperationInProgress}
- {code: 118,name: NamespaceNotSharded}
- {code: 119,name: InvalidSyncSource}
- {code: 120,name: OplogStartMissing}
- {code: 121,name: DocumentValidationFailure} # Only for the document validator on collections.
- {code: 122,name: OBSOLETE_ReadAfterOptimeTimeout}
- {code: 123,name: NotAReplicaSet}
- {code: 124,name: IncompatibleElectionProtocol}
- {code: 125,name: CommandFailed}
- {code: 126,name: RPCProtocolNegotiationFailed}
- {code: 127,name: UnrecoverableRollbackError}
- {code: 128,name: LockNotFound}
- {code: 129,name: LockStateChangeFailed}
- {code: 130,name: SymbolNotFound}
#- {code: 131,name: RLPInitializationFailed} # Removed in 4.2
- {code: 132,name: OBSOLETE_ConfigServersInconsistent}
- {code: 133,name: FailedToSatisfyReadPreference}
- {code: 134,name: ReadConcernMajorityNotAvailableYet}
- {code: 135,name: StaleTerm}
- {code: 136,name: CappedPositionLost}
- {code: 137,name: IncompatibleShardingConfigVersion}
- {code: 138,name: RemoteOplogStale}
- {code: 139,name: JSInterpreterFailure}
- {code: 140,name: InvalidSSLConfiguration}
- {code: 141,name: SSLHandshakeFailed}
- {code: 142,name: JSUncatchableError}
- {code: 143,name: CursorInUse}
- {code: 144,name: IncompatibleCatalogManager}
- {code: 145,name: PooledConnectionsDropped}
- {code: 146,name: ExceededMemoryLimit}
- {code: 147,name: ZLibError}
- {code: 148,name: ReadConcernMajorityNotEnabled,categories: [VoteAbortError]}
- {code: 149,name: NoConfigMaster}
- {code: 150,name: StaleEpoch,categories: [StaleShardVersionError,NeedRetargettingError]}
- {code: 151,name: OperationCannotBeBatched}
- {code: 152,name: OplogOutOfOrder}
- {code: 153,name: ChunkTooBig}
- {code: 154,name: InconsistentShardIdentity}
- {code: 155,name: CannotApplyOplogWhilePrimary}
- {code: 156,name: OBSOLETE_NeedsDocumentMove}
- {code: 157,name: CanRepairToDowngrade}
- {code: 158,name: MustUpgrade}
- {code: 159,name: DurationOverflow}
- {code: 160,name: MaxStalenessOutOfRange}
- {code: 161,name: IncompatibleCollationVersion}
- {code: 162,name: CollectionIsEmpty}
- {code: 163,name: ZoneStillInUse}
- {code: 164,name: InitialSyncActive}
- {code: 165,name: ViewDepthLimitExceeded}
- {code: 166,name: CommandNotSupportedOnView}
- {code: 167,name: OptionNotSupportedOnView}
- {code: 168,name: InvalidPipelineOperator}
- {code: 169,name: CommandOnShardedViewNotSupportedOnMongod,extra: ResolvedView}
- {code: 170,name: TooManyMatchingDocuments}
- {code: 171,name: CannotIndexParallelArrays}
- {code: 172,name: TransportSessionClosed}
- {code: 173,name: TransportSessionNotFound}
- {code: 174,name: TransportSessionUnknown}
- {code: 175,name: QueryPlanKilled}
- {code: 176,name: FileOpenFailed}
- {code: 177,name: ZoneNotFound}
- {code: 178,name: RangeOverlapConflict}
- {code: 179,name: WindowsPdhError}
- {code: 180,name: BadPerfCounterPath}
- {code: 181,name: AmbiguousIndexKeyPattern}
- {code: 182,name: InvalidViewDefinition}
- {code: 183,name: ClientMetadataMissingField}
- {code: 184,name: ClientMetadataAppNameTooLarge}
- {code: 185,name: ClientMetadataDocumentTooLarge}
- {code: 186,name: ClientMetadataCannotBeMutated}
- {code: 187,name: LinearizableReadConcernError}
- {code: 188,name: IncompatibleServerVersion}
- {code: 189,name: PrimarySteppedDown,categories: [NotMasterError,RetriableError]}
- {code: 190,name: MasterSlaveConnectionFailure}
- {code: 191,name: OBSOLETE_BalancerLostDistributedLock}
- {code: 192,name: FailPointEnabled}
- {code: 193,name: NoShardingEnabled}
- {code: 194,name: BalancerInterrupted}
- {code: 195,name: ViewPipelineMaxSizeExceeded}
- {code: 197,name: InvalidIndexSpecificationOption}
- {code: 198,name: OBSOLETE_ReceivedOpReplyMessage}
- {code: 199,name: ReplicaSetMonitorRemoved}
- {code: 200,name: ChunkRangeCleanupPending}
- {code: 201,name: CannotBuildIndexKeys}
- {code: 202,name: NetworkInterfaceExceededTimeLimit,categories: [ExceededTimeLimitError]}
- {code: 203,name: ShardingStateNotInitialized}
- {code: 204,name: TimeProofMismatch}
- {code: 205,name: ClusterTimeFailsRateLimiter}
- {code: 206,name: NoSuchSession}
- {code: 207,name: InvalidUUID}
- {code: 208,name: TooManyLocks}
- {code: 209,name: StaleClusterTime}
- {code: 210,name: CannotVerifyAndSignLogicalTime}
- {code: 211,name: KeyNotFound}
- {code: 212,name: IncompatibleRollbackAlgorithm}
- {code: 213,name: DuplicateSession}
- {code: 214,name: AuthenticationRestrictionUnmet}
- {code: 215,name: DatabaseDropPending}
- {code: 216,name: ElectionInProgress}
- {code: 217,name: IncompleteTransactionHistory}
- {code: 218,name: UpdateOperationFailed}
- {code: 219,name: FTDCPathNotSet}
- {code: 220,name: FTDCPathAlreadySet}
- {code: 221,name: IndexModified}
- {code: 222,name: CloseChangeStream}
- {code: 223,name: IllegalOpMsgFlag,categories: [ConnectionFatalMessageParseError]}
- {code: 224,name: QueryFeatureNotAllowed}
- {code: 225,name: TransactionTooOld,categories: [VoteAbortError]}
- {code: 226,name: AtomicityFailure}
- {code: 227,name: CannotImplicitlyCreateCollection,
extra: CannotImplicitlyCreateCollectionInfo}
- {code: 228,name: SessionTransferIncomplete}
- {code: 229,name: MustDowngrade}
- {code: 230,name: DNSHostNotFound}
- {code: 231,name: DNSProtocolError}
- {code: 232,name: MaxSubPipelineDepthExceeded}
- {code: 233,name: TooManyDocumentSequences,categories: [ConnectionFatalMessageParseError]}
- {code: 234,name: RetryChangeStream}
# this function or module is not available on this platform or configuration
- {code: 235,name: InternalErrorNotSupported}
- {code: 236,name: ForTestingErrorExtraInfo,extra: ErrorExtraInfoExample}
- {code: 237,name: CursorKilled,categories: [Interruption]}
- {code: 238,name: NotImplemented}
- {code: 239,name: SnapshotTooOld,categories: [SnapshotError]}
- {code: 240,name: DNSRecordTypeMismatch}
- {code: 241,name: ConversionFailure}
- {code: 242,name: CannotCreateCollection}
- {code: 243,name: IncompatibleWithUpgradedServer}
- {code: 244,name: NOT_YET_AVAILABLE_TransactionAborted}
- {code: 245,name: BrokenPromise}
- {code: 246,name: SnapshotUnavailable,categories: [SnapshotError]}
- {code: 247,name: ProducerConsumerQueueBatchTooLarge}
- {code: 248,name: ProducerConsumerQueueEndClosed}
- {code: 249,name: StaleDbVersion,extra: StaleDbRoutingVersion}
- {code: 250,name: StaleChunkHistory,categories: [SnapshotError]}
- {code: 251,name: NoSuchTransaction,categories: [VoteAbortError]}
- {code: 252,name: ReentrancyNotAllowed}
- {code: 253,name: FreeMonHttpInFlight}
- {code: 254,name: FreeMonHttpTemporaryFailure}
- {code: 255,name: FreeMonHttpPermanentFailure}
- {code: 256,name: TransactionCommitted}
- {code: 257,name: TransactionTooLarge}
- {code: 258,name: UnknownFeatureCompatibilityVersion}
- {code: 259,name: KeyedExecutorRetry}
- {code: 260,name: InvalidResumeToken}
- {code: 261,name: TooManyLogicalSessions}
- {code: 262,name: ExceededTimeLimit,categories: [Interruption,ExceededTimeLimitError, RetriableError]}
- {code: 263,name: OperationNotSupportedInTransaction}
- {code: 264,name: TooManyFilesOpen}
- {code: 265,name: OrphanedRangeCleanUpFailed}
- {code: 266,name: FailPointSetFailed}
- {code: 267,name: PreparedTransactionInProgress}
- {code: 268,name: CannotBackup}
- {code: 269,name: DataModifiedByRepair}
- {code: 270,name: RepairedReplicaSetNode}
- {code: 271,name: JSInterpreterFailureWithStack,extra: JSExceptionInfo}
- {code: 272,name: MigrationConflict,categories: [SnapshotError]}
- {code: 273,name: ProducerConsumerQueueProducerQueueDepthExceeded}
- {code: 274,name: ProducerConsumerQueueConsumed}
- {code: 275,name: ExchangePassthrough} # For exchange execution in aggregation. Do not reuse.
- {code: 276,name: IndexBuildAborted}
- {code: 277,name: AlarmAlreadyFulfilled}
- {code: 278,name: UnsatisfiableCommitQuorum}
- {code: 279,name: ClientDisconnect,categories: [Interruption]}
- {code: 280,name: ChangeStreamFatalError,categories: [NonResumableChangeStreamError]}
# The two codes below are for internal use only and must never be returned in a network response
# TransactionCoordinatorSteppingDown gets converted to InterruptedDueToReplStateChange
- {code: 281,name: TransactionCoordinatorSteppingDown,categories: [Interruption]}
- {code: 282,name: TransactionCoordinatorReachedAbortDecision}
- {code: 283,name: WouldChangeOwningShard,extra: WouldChangeOwningShardInfo}
- {code: 284,name: ForTestingErrorExtraInfoWithExtraInfoInNamespace,
extra: 'nested::twice::NestedErrorExtraInfoExample'}
- {code: 285,name: IndexBuildAlreadyInProgress}
- {code: 286,name: ChangeStreamHistoryLost,categories: [NonResumableChangeStreamError]}
# The code below is for internal use only and must never be returned in a network response
- {code: 287,name: TransactionCoordinatorDeadlineTaskCanceled}
- {code: 288,name: ChecksumMismatch,categories: [ConnectionFatalMessageParseError]}
# Internal only code used by WaitForMajorityService.
- {code: 289,name: WaitForMajorityServiceEarlierOpTimeAvailable}
- {code: 290,name: TransactionExceededLifetimeLimitSeconds,categories: [ExceededTimeLimitError]}
- {code: 291,name: NoQueryExecutionPlans}
- {code: 292,name: QueryExceededMemoryLimitNoDiskUseAllowed}
- {code: 293,name: InvalidSeedList}
- {code: 294,name: InvalidTopologyType}
- {code: 295,name: InvalidHeartBeatFrequency}
- {code: 296,name: TopologySetNameRequired}
- {code: 297,name: HierarchicalAcquisitionLevelViolation}
- {code: 298,name: InvalidServerType}
- {code: 299,name: OCSPCertificateStatusRevoked}
- {code: 300,name: RangeDeletionAbandonedBecauseCollectionWithUUIDDoesNotExist}
- {code: 301,name: DataCorruptionDetected}
# Error codes 4000-8999 are reserved.
# Non-sequential error codes for compatibility only)
- {code: 9001,name: SocketException,categories: [NetworkError,RetriableError]}
- {code: 9996,name: OBSOLETE_RecvStaleConfig}
- {code: 10003,name: CannotGrowDocumentInCappedNamespace}
- {code: 10107,name: NotMaster,categories: [NotMasterError,RetriableError]}
- {code: 10334,name: BSONObjectTooLarge}
- {code: 11000,name: DuplicateKey,extra: DuplicateKeyErrorInfo}
- {code: 11600,name: InterruptedAtShutdown,categories: [Interruption,ShutdownError,CancelationError,RetriableError]}
- {code: 11601,name: Interrupted,categories: [Interruption]}
- {code: 11602,name: InterruptedDueToReplStateChange,categories: [Interruption,NotMasterError,RetriableError]}
- {code: 12586,name: BackgroundOperationInProgressForDatabase}
- {code: 12587,name: BackgroundOperationInProgressForNamespace}
- {code: 13104,name: OBSOLETE_PrepareConfigsFailed}
- {code: 13113,name: MergeStageNoMatchingDocument}
- {code: 13297,name: DatabaseDifferCase}
- {code: 13388,name: StaleConfig,
extra: StaleConfigInfo,
categories: [StaleShardVersionError,NeedRetargettingError]}
- {code: 13435,name: NotMasterNoSlaveOk,categories: [NotMasterError,RetriableError]}
- {code: 13436,name: NotMasterOrSecondary,categories: [NotMasterError,RetriableError]}
- {code: 14031,name: OutOfDiskSpace}
- {code: 17280,name: OSBELETE_KeyTooLong}
|