diff --git a/src/frontend/src/components/createnewproject/DataExtract.tsx b/src/frontend/src/components/createnewproject/DataExtract.tsx index 161e4aac08..c9abbbe83f 100644 --- a/src/frontend/src/components/createnewproject/DataExtract.tsx +++ b/src/frontend/src/components/createnewproject/DataExtract.tsx @@ -69,8 +69,18 @@ const DataExtract = ({ flag, customLineUpload, setCustomLineUpload, customPolygo const geojsonExtract = await fgbGeojson.deserialize(uint8ArrayData); dispatch(CreateProjectActions.setDataExtractGeojson(geojsonExtract)); } catch (error) { - // TODO add error message for user - console.error('Error getting data extract:', error); + let errorMsg = JSON.stringify(error?.response?.data?.detail[0]?.msg); + if (errorMsg && errorMsg.includes('higher than Threshold')) { + errorMsg = 'Project area too large for data extract generation. Please reduce size or use custom extract.'; + } + dispatch( + CommonActions.SetSnackBar({ + open: true, + message: errorMsg || 'Error getting data extract.', + variant: 'error', + duration: 10000, + }), + ); } } };