tried to fix timetable and handle kreten api error

This commit is contained in:
Kima
2023-09-18 19:29:55 +02:00
parent dc93985834
commit 98d7468f24
6 changed files with 72 additions and 19 deletions

View File

@@ -89,6 +89,9 @@ class KretaClient {
}
if (res == null) throw "Login error";
if (res.body == 'invalid_grant' || res.body.replaceAll(' ', '') == '') {
throw "Auth error";
}
if (json) {
return jsonDecode(res.body);