add error message for sessions

This commit is contained in:
dd060606
2024-12-08 15:55:06 +01:00
parent 3213b78d24
commit b53a217c0b

View File

@@ -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);
}
});
});