Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update node-fetch in the API to fix connection drop issue #1397

Merged
merged 13 commits into from
Jul 29, 2023
5 changes: 5 additions & 0 deletions packages/loot-core/src/server/cloud-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,15 @@ export async function download(fileId) {
},
});
} catch (err) {
console.log('Error fetching file info', err);
throw FileDownloadError('internal', { fileId });
}

if (res.status !== 'ok') {
console.log(
'Could not download file from the server. Are you sure you have the right file ID?',
res,
);
throw FileDownloadError('internal', { fileId });
}
let fileData = res.data;
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/1397.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [j-f1]
---

Improve error messaging when the API package fails to download a file