Source code for octomachinery.github.errors

"""Exceptions collection related to interactions with GitHub."""

from gidgethub import GitHubException

import attr

# pylint: disable=relative-beyond-top-level
from ..models.action_outcomes import ActionOutcome


[docs]class GitHubError(GitHubException): """Generic GitHub-related error."""
[docs]@attr.dataclass class GitHubActionError(GitHubError): """Generic GitHub-related error.""" _outcome: ActionOutcome
[docs] def terminate_action(self): """Terminate current process using corresponding return code.""" self._outcome.raise_it()