blob: 22e44dd6cdd9ba5158a30b52e3ccdb5708d0fda5 (
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
|
export abstract class LoginError extends Error { }
export class BadNetworkError extends LoginError {
constructor() {
super('Network is bad.');
}
}
export class AlreadyLoginError extends LoginError {
constructor() {
super('Internal logical error. There is already a token saved. Please call validateUserLoginState first.');
}
}
export class BadCredentialsError extends LoginError {
constructor() {
super('Username or password is wrong.');
}
}
export class UnknownError extends LoginError {
constructor(public internalError?: any) {
super('Sorry, unknown error occured!');
}
}
|