We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 10a0a9a + 8687ce1 commit eb3098aCopy full SHA for eb3098a
source/lib/financials/balances.js
@@ -60,7 +60,14 @@ async function fetchBalancesFromServer(): Promise<BalancesOrErrorType> {
60
username: username,
61
password: password,
62
})
63
- await fetch(OLECARD_AUTH_URL, {method: 'POST', body: form})
+ let loginResponse = await fetch(OLECARD_AUTH_URL, {
64
+ method: 'POST',
65
+ body: form,
66
+ })
67
+
68
+ if (loginResponse.url.includes('message=')) {
69
+ return {error: true, value: new Error('login failed!')}
70
+ }
71
72
const resp: OleCardBalancesType = await fetchJson(OLECARD_DATA_ENDPOINT)
73
0 commit comments