Skip to content

Exceptions

synapseclient.core.exceptions

Classes

SynapseError

Bases: Exception

Generic exception thrown by the client.

Source code in synapseclient/core/exceptions.py
6
7
class SynapseError(Exception):
    """Generic exception thrown by the client."""

SynapseMd5MismatchError

Bases: SynapseError, IOError

Error raised when MD5 computed for a download file fails to match the MD5 of its file handle.

Source code in synapseclient/core/exceptions.py
10
11
class SynapseMd5MismatchError(SynapseError, IOError):
    """Error raised when MD5 computed for a download file fails to match the MD5 of its file handle."""

SynapseFileNotFoundError

Bases: SynapseError

Error thrown when a local file is not found in Synapse.

Source code in synapseclient/core/exceptions.py
14
15
class SynapseFileNotFoundError(SynapseError):
    """Error thrown when a local file is not found in Synapse."""

SynapseNotFoundError

Bases: SynapseError

Error thrown when a requested resource is not found in Synapse.

Source code in synapseclient/core/exceptions.py
18
19
class SynapseNotFoundError(SynapseError):
    """Error thrown when a requested resource is not found in Synapse."""

SynapseTimeoutError

Bases: SynapseError

Timed out waiting for response from Synapse.

Source code in synapseclient/core/exceptions.py
22
23
class SynapseTimeoutError(SynapseError):
    """Timed out waiting for response from Synapse."""

SynapseAuthenticationError

Bases: SynapseError

Unauthorized access.

Source code in synapseclient/core/exceptions.py
26
27
class SynapseAuthenticationError(SynapseError):
    """Unauthorized access."""

SynapseNoCredentialsError

Bases: SynapseAuthenticationError

No credentials for authentication

Source code in synapseclient/core/exceptions.py
30
31
class SynapseNoCredentialsError(SynapseAuthenticationError):
    """No credentials for authentication"""

SynapseFileCacheError

Bases: SynapseError

Error related to local file storage.

Source code in synapseclient/core/exceptions.py
34
35
class SynapseFileCacheError(SynapseError):
    """Error related to local file storage."""

SynapseMalformedEntityError

Bases: SynapseError

Unexpected structure of Entities.

Source code in synapseclient/core/exceptions.py
38
39
class SynapseMalformedEntityError(SynapseError):
    """Unexpected structure of Entities."""

SynapseUnmetAccessRestrictions

Bases: SynapseError

Request cannot be completed due to unmet access restrictions.

Source code in synapseclient/core/exceptions.py
42
43
class SynapseUnmetAccessRestrictions(SynapseError):
    """Request cannot be completed due to unmet access restrictions."""

SynapseProvenanceError

Bases: SynapseError

Incorrect usage of provenance objects.

Source code in synapseclient/core/exceptions.py
46
47
class SynapseProvenanceError(SynapseError):
    """Incorrect usage of provenance objects."""

SynapseHTTPError

Bases: SynapseError, HTTPError

Wraps recognized HTTP errors. See HTTPError <http://docs.python-requests.org/en/latest/api/?highlight=exceptions#requests.exceptions.HTTPError>_

Source code in synapseclient/core/exceptions.py
50
51
52
53
class SynapseHTTPError(SynapseError, requests.exceptions.HTTPError):
    """Wraps recognized HTTP errors.  See
    `HTTPError <http://docs.python-requests.org/en/latest/api/?highlight=exceptions#requests.exceptions.HTTPError>`_
    """

SynapseUploadAbortedException

Bases: SynapseError

Raised when a worker thread detects the upload was aborted and stops further processing.

Source code in synapseclient/core/exceptions.py
56
57
58
59
60
class SynapseUploadAbortedException(SynapseError):
    """Raised when a worker thread detects the upload was
    aborted and stops further processing."""

    pass

SynapseUploadFailedException

Bases: SynapseError

Raised when an upload failed. Should be chained to a cause Exception

Source code in synapseclient/core/exceptions.py
63
64
65
66
class SynapseUploadFailedException(SynapseError):
    """Raised when an upload failed. Should be chained to a cause Exception"""

    pass