-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherrors.py
More file actions
31 lines (20 loc) · 737 Bytes
/
Copy patherrors.py
File metadata and controls
31 lines (20 loc) · 737 Bytes
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
"""Plugin-internal exception types.
Centralised so callers (server, token store, CLI) can catch a single
hierarchy without importing deep modules. Public API: :class:`PluginError`
and its concrete subclasses.
"""
from __future__ import annotations
class PluginError(Exception):
"""Base class for all hermes-node-plugin errors."""
class ConfigError(PluginError):
"""Configuration is missing, malformed, or inconsistent.
Examples: unparseable YAML, port out of range, partial TLS config
(cert set but key missing), non-mapping top-level YAML.
"""
class TokenStoreError(PluginError):
"""Token store read/write/decrypt failure."""
__all__ = [
"PluginError",
"ConfigError",
"TokenStoreError",
]