Skip to content

Commit

Permalink
Do not block project loading if tilejson fetch failed
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeorge committed Mar 11, 2024
1 parent c366400 commit 88f4a86
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/assets/scripts/fsm/project/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,13 @@ export const services = {
}

if (nextTimeframe) {
nextTimeframe.tilejson = await apiClient.get(
`project/${projectId}/aoi/${context.currentAoi.id}/timeframe/${nextTimeframe.id}/tiles`
);
try {
nextTimeframe.tilejson = await apiClient.get(
`project/${projectId}/aoi/${context.currentAoi.id}/timeframe/${nextTimeframe.id}/tiles`
);
} catch (error) {
toasts.error('There was an error fetching the prediction layer.');
}
nextMosaic = mosaicsList.find(
(mosaic) => mosaic.id === nextTimeframe.mosaic
);
Expand Down

0 comments on commit 88f4a86

Please sign in to comment.