Module aiogithubapi.exceptions

Custom exceptions for aiogithubapi.

Expand source code
"""Custom exceptions for aiogithubapi."""


class GitHubException(BaseException):
    """
    This is raised when unknown exceptions occour.

    And it's used as a base for all other exceptions
    so if you want to catch all GitHub related errors
    you should catch this base exception.
    """


class GitHubConnectionException(GitHubException):
    """This is raised when there is a connection issue with GitHub."""


class GitHubRatelimitException(GitHubException):
    """This is raised when the ratelimit is reached."""


class GitHubNotFoundException(GitHubException):
    """This is raised when the requested resource is not found."""


class GitHubPayloadException(GitHubException):
    """This is raised when the payload is invalid."""


class GitHubGraphQLException(GitHubException):
    """This is raised when the response from GraphQL calls have erros."""


class GitHubPermissionException(GitHubException):
    """This is raised when the user has no permission to do the requested resource."""


class GitHubNotModifiedException(GitHubException):
    """This is raised when the providede ETag matches and the content has not been modified."""


class GitHubAuthenticationException(GitHubException):
    """This is raised when we recieve an authentication issue."""

Classes

class GitHubAuthenticationException (*args, **kwargs)

This is raised when we recieve an authentication issue.

Expand source code
class GitHubAuthenticationException(GitHubException):
    """This is raised when we recieve an authentication issue."""

Ancestors

Subclasses

class GitHubConnectionException (*args, **kwargs)

This is raised when there is a connection issue with GitHub.

Expand source code
class GitHubConnectionException(GitHubException):
    """This is raised when there is a connection issue with GitHub."""

Ancestors

class GitHubException (*args, **kwargs)

This is raised when unknown exceptions occour.

And it's used as a base for all other exceptions so if you want to catch all GitHub related errors you should catch this base exception.

Expand source code
class GitHubException(BaseException):
    """
    This is raised when unknown exceptions occour.

    And it's used as a base for all other exceptions
    so if you want to catch all GitHub related errors
    you should catch this base exception.
    """

Ancestors

  • builtins.BaseException

Subclasses

class GitHubGraphQLException (*args, **kwargs)

This is raised when the response from GraphQL calls have erros.

Expand source code
class GitHubGraphQLException(GitHubException):
    """This is raised when the response from GraphQL calls have erros."""

Ancestors

class GitHubNotFoundException (*args, **kwargs)

This is raised when the requested resource is not found.

Expand source code
class GitHubNotFoundException(GitHubException):
    """This is raised when the requested resource is not found."""

Ancestors

class GitHubNotModifiedException (*args, **kwargs)

This is raised when the providede ETag matches and the content has not been modified.

Expand source code
class GitHubNotModifiedException(GitHubException):
    """This is raised when the providede ETag matches and the content has not been modified."""

Ancestors

Subclasses

class GitHubPayloadException (*args, **kwargs)

This is raised when the payload is invalid.

Expand source code
class GitHubPayloadException(GitHubException):
    """This is raised when the payload is invalid."""

Ancestors

class GitHubPermissionException (*args, **kwargs)

This is raised when the user has no permission to do the requested resource.

Expand source code
class GitHubPermissionException(GitHubException):
    """This is raised when the user has no permission to do the requested resource."""

Ancestors

class GitHubRatelimitException (*args, **kwargs)

This is raised when the ratelimit is reached.

Expand source code
class GitHubRatelimitException(GitHubException):
    """This is raised when the ratelimit is reached."""

Ancestors

Subclasses