forked from Defelo/PyCrypCli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exceptions.py
61 lines (37 loc) · 1.48 KB
/
exceptions.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
import json
class InvalidServerResponseException(Exception):
def __init__(self, response: dict):
super().__init__("Invalid Server Response: " + json.dumps(response))
class InvalidSessionTokenException(Exception):
def __init__(self):
super().__init__("Invalid session token")
class WeakPasswordException(Exception):
def __init__(self):
super().__init__("Password is too weak")
class UsernameAlreadyExistsException(Exception):
def __init__(self):
super().__init__("Username already exists")
class InvalidEmailException(Exception):
def __init__(self):
super().__init__("Invalid Email")
class InvalidLoginException(Exception):
def __init__(self):
super().__init__("Invalid Login Credentials")
class SourceWalletTransactionDebtException(Exception):
def __init__(self):
super().__init__("Source wallet would make debt")
class InvalidWalletException(Exception):
def __init__(self):
super().__init__("Invalid Wallet UUID")
class InvalidKeyException(Exception):
def __init__(self):
super().__init__("Invalid Wallet Key")
class AlreadyOwnAWalletException(Exception):
def __init__(self):
super().__init__("You already own a wallet")
class AlreadyOwnServiceException(Exception):
def __init__(self):
super().__init__("You already own a service with this name")
class UnknownServiceException(Exception):
def __init__(self):
super().__init__("Unknown service")