blob: 929fa52ab90415e56bfe78ce031d2786b2a67baf (
plain)
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
|
export class NoCreditError extends Error {
constructor() {
super("Account doesn't have enough credit available for connection");
}
get userFriendlyTitle(): string {
return 'Out of time';
}
get userFriendlyMessage(): string {
return 'Buy more time, so you can continue using the internet securely';
}
}
export class NoInternetError extends Error {
constructor() {
super('Internet connectivity is currently unavailable');
}
get userFriendlyTitle(): string {
return 'Offline';
}
get userFriendlyMessage(): string {
return 'Your internet connection will be secured when you get back online';
}
}
export class NoDaemonError extends Error {
constructor() {
super('Could not connect to Mullvad daemon');
}
}
export class InvalidAccountError extends Error {
constructor() {
super('Invalid account number');
}
}
export class NoAccountError extends Error {
constructor() {
super('No account was set');
}
}
export class CommunicationError extends Error {
constructor() {
super('api.mullvad.net is blocked, please check your firewall');
}
}
export class UnknownError extends Error {
constructor(cause: string) {
super(`An unknown error occurred, ${cause}`);
}
get userFriendlyTitle(): string {
return 'Something went wrong';
}
}
|