errors – Exceptions raised by the bson package

Exceptions raised by the BSON package.

exception bson.errors.BSONError

Base class for all BSON exceptions.

exception bson.errors.InvalidBSON

Raised when trying to create a BSON object from invalid data.

exception bson.errors.InvalidDocument(message, document=None)

Raised when trying to create a BSON object from an invalid document.

Parameters:
  • message (str)

  • document (Optional[