-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathexceptions.py
More file actions
64 lines (40 loc) · 1.3 KB
/
exceptions.py
File metadata and controls
64 lines (40 loc) · 1.3 KB
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
# coding: utf-8
class Error(Exception):
"""Base class for all errors, should not be raised"""
pass
#
# Generic errors
#
class NetworkError(Error):
"""Something went wrong with the network"""
pass
class InvalidResponseError(Error):
"""Server responded with something we don't understand"""
pass
class UnknownResponseSchemaError(Error):
"""Server responded with XML we don't understand"""
pass
#
# LastPass returned errors
#
class LastPassUnknownUsernameError(Error):
"""LastPass error: unknown username"""
pass
class LastPassInvalidPasswordError(Error):
"""LastPass error: invalid password"""
pass
class LastPassIncorrectGoogleAuthenticatorCodeError(Error):
"""LastPass error: missing or incorrect Google Authenticator code"""
pass
class LastPassIncorrectYubikeyPasswordError(Error):
"""LastPass error: missing or incorrect Yubikey password"""
pass
class LastPassIncorrectOutOfBandRequiredError(Error):
"""LastPass error: need to provide out of band authentication (e.g, LastPass Authenticator)"""
pass
class LastPassIncorrectMultiFactorResponseError(Error):
"""LastPass error: Multifactor response failed (wrong code or denied)"""
pass
class LastPassUnknownError(Error):
"""LastPass error we don't know about"""
pass