# `errors` – Exceptions raised by the `gridfs` package

Exceptions raised by the `gridfs` package

exception gridfs.errors.CorruptGridFile(message='', error_labels=None)

  Raised when a file in `GridFS` is malformed.

  Parameters:

    - message (str)

    - error_labels (Optional[Iterable[str]])

  Return type:

    None

exception gridfs.errors.FileExists(message='', error_labels=None)

  Raised when trying to create a file that already exists.

  Parameters:

    - message (str)

    - error_labels (Optional[Iterable[str]])

  Return type:

    None

exception gridfs.errors.GridFSError(message='', error_labels=None)

  Base class for all GridFS exceptions.

  Parameters:

    - message (str)

    - error_labels (Optional[Iterable[str]])

  Return type:

    None

exception gridfs.errors.NoFile(message='', error_labels=None)

  Raised when trying to read from a non-existent file.

  Parameters:

    - message (str)

    - error_labels (Optional[Iterable[str]])

  Return type:

    None