errors – Exceptions raised by the bson package

    exception

    Base class for all BSON exceptions.

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

    exception

    exception bson.errors.InvalidId

    Raised when trying to create an ObjectId from invalid data.

    Raised when trying to encode a string containing non-UTF8 data.