Skip to content

Commit

Permalink
fix(project): display error generated on the backend (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
NSUWAL123 authored Jul 23, 2024
1 parent b8c9c83 commit 264fc14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/frontend/src/api/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,11 @@ export const DownloadSubmissionGeojson = (url, projectName) => {
a.click();
dispatch(ProjectActions.SetDownloadSubmissionGeojsonLoading(false));
} catch (error) {
const errortxt = JSON.parse(await error.response.data.text()).detail;
dispatch(
CommonActions.SetSnackBar({
open: true,
message: 'Failed to download submission geojson.',
message: errortxt || 'Failed to download submission geojson.',
variant: 'error',
duration: 2000,
}),
Expand Down

0 comments on commit 264fc14

Please sign in to comment.