-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🔖 release changes for version 0.4.0
- Loading branch information
Showing
32 changed files
with
3,335 additions
and
2,200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
from dataclasses import dataclass | ||
|
||
__all__ = ["GalaxyError", "IntegrationRunError", "IntegrationRunMethodError", "EntityPushTaskError"] | ||
|
||
|
||
class GalaxyError(Exception): | ||
"""Base class for all Galaxy errors.""" | ||
|
||
|
||
class CronjobRunError(GalaxyError): | ||
"""Exception raised when Galaxy cronjob run fails.""" | ||
|
||
|
||
@dataclass(kw_only=True) | ||
class IntegrationRunError(GalaxyError): | ||
"""Exception raised when an integration run fails.""" | ||
|
||
integration_id: str | ||
integration_type: str | ||
errors: list[Exception] | ||
|
||
def __str__(self): | ||
return f"Error running integration: {self.integration_id} ({self.integration_type}): {self.errors}" | ||
|
||
|
||
@dataclass(kw_only=True) | ||
class IntegrationRunMethodError(Exception): | ||
"""Exception raised when an integration run method fails.""" | ||
|
||
integration_id: str | ||
integration_type: str | ||
method: str | ||
error: Exception | ||
|
||
def __str__(self): | ||
return ( | ||
f"Error running in method {self.method!r} for integration {self.integration_id}" | ||
f" ({self.integration_type}): {self.error}" | ||
) | ||
|
||
|
||
@dataclass(kw_only=True) | ||
class EntityPushTaskError(Exception): | ||
"""Exception raised when an entity push task fails.""" | ||
|
||
integration_id: str | ||
integration_type: str | ||
error: Exception | ||
entity_ids: list[str] | ||
|
||
def __str__(self): | ||
if len(self.entity_ids) == 1: | ||
return f"Entity ({self.entity_ids[0]!r}) push task error: {self.integration_id} ({self.integration_type}): {self.error} " | ||
return ( | ||
f"Entity push task error: {self.integration_id} ({self.integration_type}): {self.error} " | ||
f"(entity_ids: {', '.join(self.entity_ids)})" | ||
) |
Oops, something went wrong.