Skip to content

Commit 01ab9e6

Browse files
authored
Merge pull request #1129 from david-roper/export-crash
Fixing export crash
2 parents cc430ff + 60ecdea commit 01ab9e6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

apps/web/src/features/datahub/pages/DataHubPage.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ export const DataHubPage = () => {
4242

4343
const handleExportSelection = (option: 'CSV' | 'Excel' | 'JSON') => {
4444
const baseFilename = `${currentUser!.username}_${new Date().toISOString()}`;
45+
addNotification({
46+
message: t({
47+
en: 'Exporting entries, please wait...',
48+
fr: 'Téléchargement des entrées, veuillez patienter...'
49+
}),
50+
type: 'info'
51+
});
4552
getExportRecords()
4653
.then((data): any => {
4754
switch (option) {

apps/web/src/services/axios.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ axios.interceptors.request.use((config) => {
1313
config.headers.setAccept('application/json');
1414

1515
// Do not set timeout for setup (can be CPU intensive, especially on slow server)
16-
if (config.url !== '/v1/setup' && config.url !== '/v1/instrument-records/upload') {
16+
if (
17+
config.url !== '/v1/setup' &&
18+
config.url !== '/v1/instrument-records/upload' &&
19+
config.url !== '/v1/instrument-records/export'
20+
) {
1721
config.timeout = 10000; // abort request after 10 seconds
1822
config.timeoutErrorMessage = i18n.t({
1923
en: 'Network Error',

0 commit comments

Comments
 (0)