forked from ruimarinho/gsts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.js
35 lines (28 loc) · 714 Bytes
/
errors.js
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
/**
* ProfileNotFoundError class.
*/
export class ProfileNotFoundError extends Error {
constructor(profile) {
super(`Profile "${profile}" not found in credentials file`);
this.profile = profile;
}
}
/**
* RoleMismatchError class.
*/
export class RoleMismatchError extends Error {
constructor(receivedRole, expectedRole) {
super(`Received role ${receivedRole} but expected ${expectedRole}`);
this.receivedRole = receivedRole;
this.expectedRole = expectedRole;
}
}
/**
* RoleNotFoundError class.
*/
export class RoleNotFoundError extends Error {
constructor(roles) {
super('Custom role not found');
this.roles = roles;
}
}