MongoDB Errors

Browse server error codes and driver error classes with explanations and diagnostic guidance.

JavaMongoBulkWriteException
An exception that indicates one or more errors occurred during a bulk write operation
writeserver
JavaMongoClientException
An exception indicating a problem with the MongoClient configuration or state
general
JavaMongoCommandException
An exception indicating that a command sent to a MongoDB server returned a failure
server
JavaMongoConfigurationException
An exception indicating invalid configuration of the MongoDB client (e.g. malformed connection string)
configuration
JavaMongoException
Base exception for all MongoDB Java driver errors
driver
JavaMongoInternalException
An exception indicating an internal driver error that should not normally occur
general
JavaMongoInterruptedException
An exception indicating that the thread executing a MongoDB operation was interrupted
general
JavaMongoNodeIsRecoveringException
An exception indicating the server is in a recovering state and cannot accept the operation
server
JavaMongoNotPrimaryException
An exception indicating the server is not the primary and the operation requires a primary
server
JavaMongoQueryException
An exception indicating that a query operation on a MongoDB server has failed
server
JavaMongoSecurityException
An exception indicating that authentication with the MongoDB server failed
authentication
JavaMongoServerException
An exception that represents an error response from the MongoDB server
general
JavaMongoSocketException
A failure in the underlying socket communication with a MongoDB server
connectivitynetworking
JavaMongoSocketOpenException
An exception indicating that a socket could not be opened to a MongoDB server
connectivity
JavaMongoSocketReadException
An exception indicating a failure to read from a MongoDB server socket
connectivity
JavaMongoSocketReadTimeoutException
An exception indicating that a socket read timed out (no data received within the configured timeout)
timeoutconnectivity
JavaMongoSocketWriteException
An exception indicating a failure to write to a MongoDB server socket
connectivitywrite
JavaMongoTimeoutException
The driver timed out waiting for a suitable server or for the operation to complete
connectivitytimeout
JavaMongoWriteConcernException
An exception that indicates a write concern was not fulfilled within the specified time limit
writeserver
JavaMongoWriteException
An exception indicating an error on a write operation (e.g. duplicate key, write concern failure)
writeserver