jmwalletd.errors
jmwalletd.errors
Custom exception types for the wallet daemon API.
Each exception maps to a specific HTTP status code and error message, matching the reference JoinMarket implementation's error semantics.
Classes
ActionNotAllowed
Bases: JMWalletDaemonError
400 - The requested action is not allowed in the current state.
Source code in jmwalletd/src/jmwalletd/errors.py
28 29 30 31 32 | |
Attributes
detail = 'Action not allowed.'
class-attribute
instance-attribute
status_code = 400
class-attribute
instance-attribute
BackendNotReady
Bases: JMWalletDaemonError
503 - The blockchain backend is not available.
Source code in jmwalletd/src/jmwalletd/errors.py
140 141 142 143 144 | |
Attributes
detail = 'Backend daemon not available.'
class-attribute
instance-attribute
status_code = 503
class-attribute
instance-attribute
ConfigNotPresent
Bases: JMWalletDaemonError
409 - Required config section/field does not exist.
Source code in jmwalletd/src/jmwalletd/errors.py
105 106 107 108 109 | |
Attributes
detail = 'Action cannot be performed, config vars are not set.'
class-attribute
instance-attribute
status_code = 409
class-attribute
instance-attribute
InsufficientScope
Bases: JMWalletDaemonError
403 - Token does not have the required scope.
Source code in jmwalletd/src/jmwalletd/errors.py
49 50 51 52 53 | |
Attributes
detail = 'Insufficient scope.'
class-attribute
instance-attribute
status_code = 403
class-attribute
instance-attribute
InvalidCredentials
Bases: JMWalletDaemonError
401 - Wrong password or credentials.
Source code in jmwalletd/src/jmwalletd/errors.py
35 36 37 38 39 | |
Attributes
detail = 'Invalid credentials.'
class-attribute
instance-attribute
status_code = 401
class-attribute
instance-attribute
InvalidRequestFormat
Bases: JMWalletDaemonError
400 - Malformed or invalid request body.
Source code in jmwalletd/src/jmwalletd/errors.py
21 22 23 24 25 | |
Attributes
detail = 'Invalid request format.'
class-attribute
instance-attribute
status_code = 400
class-attribute
instance-attribute
InvalidToken
Bases: JMWalletDaemonError
401 - Bearer token is invalid, expired, or missing.
Source code in jmwalletd/src/jmwalletd/errors.py
42 43 44 45 46 | |
Attributes
detail = 'Invalid token.'
class-attribute
instance-attribute
status_code = 401
class-attribute
instance-attribute
JMWalletDaemonError
Bases: Exception
Base exception for all wallet daemon errors.
Source code in jmwalletd/src/jmwalletd/errors.py
10 11 12 13 14 15 16 17 18 | |
Attributes
detail: str = detail or self.__class__.detail
class-attribute
instance-attribute
status_code: int = 500
class-attribute
instance-attribute
Methods:
__init__(detail: str | None = None) -> None
Source code in jmwalletd/src/jmwalletd/errors.py
16 17 18 | |
LockExists
Bases: JMWalletDaemonError
409 - A lock file prevents the operation.
Source code in jmwalletd/src/jmwalletd/errors.py
98 99 100 101 102 | |
Attributes
detail = 'Wallet cannot be created/opened, it is locked.'
class-attribute
instance-attribute
status_code = 409
class-attribute
instance-attribute
NoWalletFound
Bases: JMWalletDaemonError
404 - No wallet is currently loaded.
Source code in jmwalletd/src/jmwalletd/errors.py
56 57 58 59 60 | |
Attributes
detail = 'No wallet loaded.'
class-attribute
instance-attribute
status_code = 404
class-attribute
instance-attribute
NotEnoughCoinsForMaker
Bases: JMWalletDaemonError
409 - No confirmed coins available to start maker.
Source code in jmwalletd/src/jmwalletd/errors.py
119 120 121 122 123 | |
Attributes
detail = 'Maker could not start, no confirmed coins.'
class-attribute
instance-attribute
status_code = 409
class-attribute
instance-attribute
NotEnoughCoinsForTumbler
Bases: JMWalletDaemonError
409 - No confirmed coins available to start tumbler.
Source code in jmwalletd/src/jmwalletd/errors.py
126 127 128 129 130 | |
Attributes
detail = 'Tumbler could not start, no confirmed coins.'
class-attribute
instance-attribute
status_code = 409
class-attribute
instance-attribute
ServiceAlreadyStarted
Bases: JMWalletDaemonError
401 - Maker/taker service is already running.
Source code in jmwalletd/src/jmwalletd/errors.py
70 71 72 73 74 | |
Attributes
detail = 'Service already started.'
class-attribute
instance-attribute
status_code = 401
class-attribute
instance-attribute
ServiceNotStarted
Bases: JMWalletDaemonError
401 - Cannot stop a service that is not running.
Source code in jmwalletd/src/jmwalletd/errors.py
77 78 79 80 81 | |
Attributes
detail = 'Service cannot be stopped as it is not running.'
class-attribute
instance-attribute
status_code = 401
class-attribute
instance-attribute
TransactionFailed
Bases: JMWalletDaemonError
409 - The transaction could not be completed.
Source code in jmwalletd/src/jmwalletd/errors.py
112 113 114 115 116 | |
Attributes
detail = 'Transaction failed.'
class-attribute
instance-attribute
status_code = 409
class-attribute
instance-attribute
WalletAlreadyExists
Bases: JMWalletDaemonError
409 - The wallet file already exists and cannot be overwritten.
Source code in jmwalletd/src/jmwalletd/errors.py
91 92 93 94 95 | |
Attributes
detail = 'Wallet file cannot be overwritten.'
class-attribute
instance-attribute
status_code = 409
class-attribute
instance-attribute
WalletAlreadyUnlocked
Bases: JMWalletDaemonError
401 - Another wallet is already unlocked.
Source code in jmwalletd/src/jmwalletd/errors.py
84 85 86 87 88 | |
Attributes
detail = 'Wallet already unlocked.'
class-attribute
instance-attribute
status_code = 401
class-attribute
instance-attribute
WalletNotFound
Bases: JMWalletDaemonError
404 - The requested wallet file does not exist.
Source code in jmwalletd/src/jmwalletd/errors.py
63 64 65 66 67 | |
Attributes
detail = 'Wallet file not found.'
class-attribute
instance-attribute
status_code = 404
class-attribute
instance-attribute
YieldGeneratorDataUnreadable
Bases: JMWalletDaemonError
404 - The yield generator report file is not available.
Source code in jmwalletd/src/jmwalletd/errors.py
133 134 135 136 137 | |