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.
1 parent dfc041a commit fe221cbCopy full SHA for fe221cb
source/lib/financials/balances.js
@@ -60,7 +60,11 @@ 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, {method: 'POST', body: form})
64
+
65
+ if (loginResponse.url.includes('message=')) {
66
+ return {error: true, value: new Error('login failed!')}
67
+ }
68
69
const resp: OleCardBalancesType = await fetchJson(OLECARD_DATA_ENDPOINT)
70
0 commit comments