class BSON::InvalidDocument

Raised when trying to insert a document that exceeds the 4MB limit or when the document contains objects that can't be serialized as BSON.