# -*- coding: utf-8 -*-
"""
pygsheets.exceptions
~~~~~~~~~~~~~~~~~~~~
Exceptions used in pygsheets.
"""
class PyGsheetsException(Exception):
"""A base class for pygsheets's exceptions."""
[docs]class AuthenticationError(PyGsheetsException):
"""An error during authentication process."""
[docs]class SpreadsheetNotFound(PyGsheetsException):
"""Trying to open non-existent or inaccessible spreadsheet."""
[docs]class WorksheetNotFound(PyGsheetsException):
"""Trying to open non-existent or inaccessible worksheet."""
class CellNotFound(PyGsheetsException):
"""Cell lookup exception."""
class RangeNotFound(PyGsheetsException):
"""Range lookup exception."""
class TeamDriveNotFound(PyGsheetsException):
"""TeamDrive Lookup Exception"""
class FolderNotFound(PyGsheetsException):
"""Folder lookup exception."""
[docs]class NoValidUrlKeyFound(PyGsheetsException):
"""No valid key found in URL."""
[docs]class IncorrectCellLabel(PyGsheetsException):
"""The cell label is incorrect."""
[docs]class RequestError(PyGsheetsException):
"""Error while sending API request."""
[docs]class InvalidArgumentValue(PyGsheetsException):
"""Invalid value for argument"""
[docs]class InvalidUser(PyGsheetsException):
"""Invalid user/domain"""
class CannotRemoveOwnerError(PyGsheetsException):
"""A owner permission cannot be removed if is the last one."""