mirror of
https://github.com/dd060606/WebAurion-API.git
synced 2026-01-19 00:57:32 +01:00
add error message for sessions
This commit is contained in:
@@ -169,7 +169,7 @@ export function login(username: string, password: string): Promise<Session> {
|
||||
.split("=")[1];
|
||||
resolve(new Session(baseURL, token));
|
||||
} else {
|
||||
reject(new Error("Login failed."));
|
||||
reject(response);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -180,7 +180,7 @@ export function login(username: string, password: string): Promise<Session> {
|
||||
.split("=")[1];
|
||||
resolve(new Session(baseURL, token));
|
||||
} else {
|
||||
reject(new Error("Login failed."));
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user