MongoDB error codes
- E11000E11000 duplicate key error collection
- 11000DuplicateKey (error code 11000)
- 13Unauthorized (error code 13)
- 18AuthenticationFailed (error code 18)
- 11600InterruptedAtShutdown (error code 11600)
- 50MaxTimeMSExpired (error code 50)
- 251NoSuchTransaction (error code 251)
- 112WriteConflict (error code 112)
- 133FailedToSatisfyReadPreference (error code 133)
- 6HostUnreachable (error code 6)
- 89NetworkTimeout (error code 89)
- 262ExceededTimeLimit (error code 262)
- 292QueryExceededMemoryLimitNoDiskUseAllowed (error code 292)
- 26NamespaceNotFound (error code 26)
- 43CursorNotFound (error code 43)
- 211KeyNotFound (error code 211)
- 121DocumentValidationFailure
- 40ConflictingUpdateOperators
- 66ImmutableField (cannot update _id)
- 2BadValue
- 14TypeMismatch
- 10334BSONObjectTooLarge
- 46LockBusy
- 96OperationFailed
- 72InvalidOptions
- 9FailedToParse
- 134ReadConcernMajorityNotAvailableYet
- 202NetworkInterfaceExceededTimeLimit
- 31 RoleNotFoundRole not found
- 263 OperationNotSupportedInTransactionOperation not supported inside a multi-document transaction
- 20 IllegalOperationIllegal operation
- 48 NamespaceExistsNamespace (collection) already exists
- 11601 InterruptedOperation was interrupted
- 85 IndexOptionsConflictIndex already exists with different options / different name
- 67 CannotCreateIndexCannot create index
- 27 IndexNotFoundIndex not found
- 79 UnknownReplWriteConcernUnknown replica set write concern
- 10107 NotWritablePrimarynot master / not writable primary
- 91 ShutdownInProgressThe server is in the process of shutting down
- 189 PrimarySteppedDownPrimary stepped down while operation was in progress
- 24 LockTimeoutOperation exceeded time limit waiting for a lock
- 7 HostNotFoundCould not find host
- 175 QueryPlanKilledQuery plan killed during execution
- 11602 InterruptedDueToReplStateChangeOperation interrupted due to a replication state change
- 136 CappedPositionLostCapped collection position lost
- 28 PathNotViableCannot use the part of the path to traverse the element
- 216 ElectionInProgressElectionInProgress
- 225 TransactionTooOldTransactionTooOld
- 246 SnapshotUnavailableSnapshotUnavailable
- 257 TransactionTooLargeTransactionTooLarge
- 276 IndexBuildAbortedIndexBuildAborted
- 86 IndexKeySpecsConflictIndexKeySpecsConflict
- 166 CommandNotSupportedOnViewCommandNotSupportedOnView
- 168 InvalidPipelineOperatorInvalidPipelineOperator
- 118 NamespaceNotShardedNamespaceNotSharded