Skip to content

Commit

Permalink
fix mocked error
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloamorimbr committed Oct 30, 2024
1 parent bb5d422 commit 72d942a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jsapp/js/components/activity/activityLogs.query.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {keepPreviousData, useQuery} from '@tanstack/react-query';
import type {KoboSelectOption} from 'js/components/common/koboSelect';
import type {PaginatedResponse} from 'js/dataInterface';
import type {FailResponse, PaginatedResponse} from 'js/dataInterface';
import moment from 'moment';
import {QueryKeys} from 'js/query/queryKeys';

Expand Down Expand Up @@ -81,7 +81,11 @@ const startActivityLogsExport = async () =>
if (Math.random() > 0.5) {
resolve();
} else {
reject();
const failResponse: FailResponse = {
status: 500,
statusText: 'Mocked error',
};
reject(failResponse);
}
}, 500);
});
Expand Down

0 comments on commit 72d942a

Please sign in to comment.