Skip to content

Commit

Permalink
Merge pull request #146 from developmentseed/enhance/tilejson-fetch
Browse files Browse the repository at this point in the history
Do not block project loading if tilejson fetch failed
  • Loading branch information
vgeorge authored Mar 11, 2024
2 parents c366400 + 88f4a86 commit 6f99b3b
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 6f99b3b

Please sign in to comment.