mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-27 17:48:17 -05:00
Fix crash when SimpleFIN JSON data is bad. (#409)
This commit is contained in:
@@ -281,7 +281,12 @@ async function getAccounts(accessKey, startDate, endDate) {
|
||||
data += d;
|
||||
});
|
||||
res.on('end', () => {
|
||||
resolve(JSON.parse(data));
|
||||
try {
|
||||
resolve(JSON.parse(data));
|
||||
} catch (e) {
|
||||
console.log(`Error parsing JSON response: ${data}`);
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
6
upcoming-release-notes/409.md
Normal file
6
upcoming-release-notes/409.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [psybers,iffy]
|
||||
---
|
||||
|
||||
Fix crash when SimpleFIN JSON data is bad.
|
||||
Reference in New Issue
Block a user