developmentseed / pearl-frontend

PEARL (Planetary Computer Land Cover Mapping) Frontend
https://landcover.io
MIT License
18 stars 6 forks source link

Do not block project loading if tilejson fetch failed #146

Closed vgeorge closed 6 months ago

vgeorge commented 6 months ago

This avoids blocking project load if the last prediction is "broken".

In the situation, the timeframe exists, but GET /timeframe/:id/tiles returns AOI TimeFrame has not been uploaded with 404 status.

Before this fix, the UI would always redirect to the project page, making it impossible to load the project.

With the fix, a toast will be displayed and the user will be able to keep working on a project.

@LanesGood this one is hard to replicate as it depends on a backend failure. But it looks like a simple change to merge it if you think it is correct.

LanesGood commented 6 months ago

@vgeorge so if I load a project in this branch and the API can't get the tiles, does the project load with just the blue box around the AOI? Or does it switch to a different AOI and attempt to get those tiles?

vgeorge commented 6 months ago

@LanesGood it would just display the blue bounds of the aoi, without trying to fetch a different timeframe.