<!-- llms-explorer concept facts · https://llms-explorer.com/tree/error-codes-and-troubleshooting-architecture-internals/ · pack 2026-10-15 · ~2542 tokens -->

# Error Codes and Troubleshooting Architecture Internals

> Depth-first rabbithole dossier for Error Codes and Troubleshooting Architecture Internals; source-anchored research pack.

Parent: [Error Codes and Troubleshooting](https://llms-explorer.com/tree/error-codes-and-troubleshooting/) · 5 facets · 23 facts · page: https://llms-explorer.com/tree/error-codes-and-troubleshooting-architecture-internals/

## Definitions

- [low] RetriableError is an ErrorCategory that includes all retriable ErrorCodes, such as HostUnreachable and HostNotFound. Sources: https://github.com/mongodb/mongo/blob/master/docs/exception_architecture.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`

## How it works

- [low] Node A enters ROLLBACK when its oplogFetcher sees that the first document returned from node B does not match the last entry in its oplog, indicating divergence. Sources: https://www.percona.com/blog/mongodb-rollback-in-replicaset/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#troubleshooting`

## Problems, failure modes and limitations

- [low] The error codes StaleShardVersion and NoShardingEnabled were deprecated starting in MongoDB 6.0. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/manual/reference/error-codes.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#troubleshooting`
- [low] The error codes FreeMonHttpInFlight, FreeMonHttpTemporaryFailure, FreeMonHttpPermanentFailure, and ShardInvalidatedForTargeting were deprecated starting in MongoDB 7.1. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/manual/reference/error-codes.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#troubleshooting`
- [low] The error codes ChangeStreamTopologyChange and ChangeStreamNotEnabled were deprecated starting in MongoDB 8.3. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/manual/reference/error-codes.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#troubleshooting`
- [low] Internal error codes are for internal use only and must never be returned to clients in network responses. Sources: https://github.com/mongodb/mongo/blob/master/docs/exception_architecture.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] Error codes 4000-8999 are reserved, and codes 65000-70999 are reserved for extension-developed logs and errors, which should not be used unless writing an extension. Sources: https://raw.githubusercontent.com/mongodb/mongo/master/src/mongo/base/error_codes.yml — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] The error codes ChangeStreamTopologyChange (348), ChangeStreamNotEnabled (376), and ResumeTenantChangeStream (401) were removed in MongoDB v8.3. (verified as of 2026-10-15) Sources: https://raw.githubusercontent.com/mongodb/mongo/master/src/mongo/base/error_codes.yml — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] The error codes FreeMonHttpInFlight (253), FreeMonHttpTemporaryFailure (254), and FreeMonHttpPermanentFailure (255) were removed in MongoDB 7.1. (verified as of 2026-10-15) Sources: https://raw.githubusercontent.com/mongodb/mongo/master/src/mongo/base/error_codes.yml — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] The DocumentValidationFailure error code is specific to the document validator on collections. Sources: https://www.mongodb.com/docs/manual/reference/error-codes.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#troubleshooting`
- [low] MongoDB error counters reset to zero and the 'rollovers' counter increments when any counter reaches the value 1 << 30. Sources: https://github.com/mongodb/mongo/blob/master/docs/exception_architecture.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] The iassert macro logs at debug level 3 without incrementing user assertion counters, while massert logs the message as an error and uassert logs at debug level 1. Sources: https://github.com/mongodb/mongo/blob/master/docs/exception_architecture.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] A Status object uses standardized ErrorCodes to determine the underlying cause of an error and allows assigning a textual description and code-specific extra info for clarification. Sources: https://github.com/mongodb/mongo/blob/master/docs/exception_architecture.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] The error code WriteConflictRetryLimitExceeded (512), categorized as SystemOverloadedError and RetriableError, was removed in MongoDB v9.1. (verified as of 2026-10-15) Sources: https://raw.githubusercontent.com/mongodb/mongo/master/src/mongo/base/error_codes.yml — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] The function ErrorCodes::isA<${category}>(${error}) checks if an error belongs to a specific category. Sources: https://github.com/mongodb/mongo/blob/master/docs/exception_architecture.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] MongoDB provides StatusWith to enable functions to return an error code or a value without requiring multiple outputs. Sources: https://github.com/mongodb/mongo/blob/master/docs/exception_architecture.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] The error code InterruptedDueToLogServerDisconnect (505) was removed in MongoDB v9.0. (verified as of 2026-10-15) Sources: https://raw.githubusercontent.com/mongodb/mongo/master/src/mongo/base/error_codes.yml — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] A specific error category contains all errors due to the system being under pressure. Sources: https://raw.githubusercontent.com/mongodb/mongo/master/src/mongo/base/error_codes.yml — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`
- [low] A specific error code must never be used outside of cluster user management commands. Sources: https://raw.githubusercontent.com/mongodb/mongo/master/src/mongo/base/error_codes.yml — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`

## Comparisons and alternatives

- [low] Noexcept is a runtime check that terminates the process rather than allowing a function to exit via a throw, and allocations using the global new allocator or std::allocator terminate the process directly on OOM conditions instead of throwing. Sources: https://github.com/mongodb/mongo/blob/master/docs/exception_architecture.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`

## Facts and statements

- [low] MongoDB writes ROLLBACK documents under the rollback directory in the dbpath, and recovered collections are named with the namespace as a prefix and the date time as a suffix. Sources: https://www.percona.com/blog/mongodb-rollback-in-replicaset/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#troubleshooting`
- [low] During a rollback, Node A finds the common point between its oplog and syncSource B’s oplog, then undoes operations in its oplog back to that common point. Sources: https://www.percona.com/blog/mongodb-rollback-in-replicaset/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#troubleshooting`
- [low] MongoDB ErrorCodes are defined in a YAML file and converted to C++ files using the IDL parser at compile time. Sources: https://github.com/mongodb/mongo/blob/master/docs/exception_architecture.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/error-codes-and-troubleshooting-architecture-internals-7c4152af02/rabbithole-synthesis.md#core`

## Related concepts

- Error — is a part of Error Codes and Troubleshooting Architecture Internals
- and — is a part of Error Codes and Troubleshooting Architecture Internals
- Codes — is a part of Error Codes and Troubleshooting Architecture Internals
- Troubleshooting — is a part of Error Codes and Troubleshooting Architecture Internals
