-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy patherrors.ts
More file actions
71 lines (58 loc) · 2.07 KB
/
Copy patherrors.ts
File metadata and controls
71 lines (58 loc) · 2.07 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
65
66
67
68
69
70
71
import ErrorPolykey from '../ErrorPolykey.js';
import sysexits from '../utils/sysexits.js';
class ErrorClient<T> extends ErrorPolykey<T> {}
class ErrorClientAuthMissing<T> extends ErrorClient<T> {
static description = 'Authorisation metadata is required but missing';
exitCode = sysexits.NOPERM;
}
class ErrorClientAuthFormat<T> extends ErrorClient<T> {
static description = 'Authorisation metadata has invalid format';
exitCode = sysexits.USAGE;
}
class ErrorClientAuthDenied<T> extends ErrorClient<T> {
static description = 'Authorisation metadata is incorrect or expired';
exitCode = sysexits.NOPERM;
}
class ErrorClientInvalidHeader<T> extends ErrorClient<T> {
static description = 'The header message does not match the expected type';
exitCode = sysexits.USAGE;
}
class ErrorClientProtocolError<T> extends ErrorClient<T> {
static description = 'Data does not match the protocol requirements';
exitCode = sysexits.USAGE;
}
class ErrorClientService<T> extends ErrorClient<T> {}
class ErrorClientServiceRunning<T> extends ErrorClientService<T> {
static description = 'ClientService is running';
exitCode = sysexits.USAGE;
}
class ErrorClientServiceNotRunning<T> extends ErrorClientService<T> {
static description = 'ClientService is not running';
exitCode = sysexits.USAGE;
}
class ErrorClientServiceDestroyed<T> extends ErrorClientService<T> {
static description = 'ClientService is destroyed';
exitCode = sysexits.USAGE;
}
class ErrorClientVerificationFailed<T> extends ErrorClientService<T> {
static description = 'ClientService is destroyed';
exitCode = sysexits.USAGE;
}
class ErrorClientAuthenticationInvalidToken<T> extends ErrorClient<T> {
static description = 'Token is invalid';
exitCode = sysexits.PROTOCOL;
}
export {
ErrorClient,
ErrorClientAuthMissing,
ErrorClientAuthFormat,
ErrorClientAuthDenied,
ErrorClientInvalidHeader,
ErrorClientProtocolError,
ErrorClientService,
ErrorClientServiceRunning,
ErrorClientServiceNotRunning,
ErrorClientServiceDestroyed,
ErrorClientVerificationFailed,
ErrorClientAuthenticationInvalidToken,
};