-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy patherrors.py
81 lines (42 loc) · 1.91 KB
/
errors.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
"""Errors used by the charm."""
from __future__ import annotations
class RunnerError(Exception):
"""Generic runner error as base exception."""
class RunnerCreateError(RunnerError):
"""Error for runner creation failure."""
class RunnerStartError(RunnerError):
"""Error for runner start failure."""
class MissingServerConfigError(RunnerError):
"""Error for unable to create runner due to missing server configurations."""
class IssueMetricEventError(Exception):
"""Represents an error when issuing a metric event."""
class RunnerMetricsError(Exception):
"""Base class for all runner metrics errors."""
class GithubMetricsError(Exception):
"""Base class for all github metrics errors."""
class PlatformClientError(Exception):
"""Base class for all github client errors."""
class PlatformApiError(PlatformClientError):
"""Represents an error when the GitHub API returns an error."""
class TokenError(PlatformClientError):
"""Represents an error when the token is invalid or has not enough permissions."""
class JobNotFoundError(PlatformClientError):
"""Represents an error when the job could not be found on the platform."""
class CloudError(Exception):
"""Base class for cloud (as e.g. OpenStack) errors."""
class OpenStackError(CloudError):
"""Base class for OpenStack errors."""
class OpenStackInvalidConfigError(OpenStackError):
"""Represents an invalid OpenStack configuration."""
class SSHError(Exception):
"""Represents an error while interacting with SSH."""
class KeyfileError(SSHError):
"""Represents missing keyfile for SSH."""
class ReconcileError(Exception):
"""Base class for all reconcile errors."""
class OpenstackHealthCheckError(Exception):
"""Base class for all health check errors."""
class LockError(Exception):
"""Base class for lock errors."""