Source code for pyDataverse.exceptions

"""Find out more at"""

[docs]class DataverseError(Exception): """Base exception class for Dataverse-related error.""" pass
[docs]class DataverseApiError(DataverseError): """Base exception class for Dataverse-related api error.""" pass
[docs]class OperationFailedError(DataverseApiError): """Raised when an operation fails for an unknown reason.""" pass
[docs]class ApiUrlError(DataverseApiError): """Raised when the request url is not valid.""" pass
[docs]class ApiResponseError(DataverseApiError): """Raised when the requests response fails.""" pass
[docs]class ApiAuthorizationError(OperationFailedError): """Raised if a user provides invalid credentials.""" pass
[docs]class DataverseNotEmptyError(OperationFailedError): """Raised when a Dataverse has accessioned Datasets.""" pass
[docs]class DataverseNotFoundError(OperationFailedError): """Raised when a Dataverse cannot be found.""" pass
[docs]class DatasetNotFoundError(OperationFailedError): """Raised when a Dataset cannot be found.""" pass
[docs]class DatafileNotFoundError(OperationFailedError): """Raised when a Datafile cannot be found.""" pass