Commit ebcb497
committed
Fix: Prevent titiler_endpoint from being overwritten in stac_tile
When stac_stats fails for Planetary Computer items, it was overwriting
the titiler_endpoint variable with a fallback string endpoint. This caused
the subsequent tile request to use the wrong endpoint path (/stac/ instead
of /item/), which expects different parameters and returns errors.
Changes:
1. Use a separate fallback_endpoint variable for stac_stats fallback
2. Add error handling to check for 'tiles' key before accessing it
3. Provide informative error messages based on API response type
Fixes opengeos/geoai#4681 parent cf92c4e commit ebcb497
1 file changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
709 | | - | |
| 709 | + | |
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
714 | | - | |
| 714 | + | |
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
| |||
850 | 850 | | |
851 | 851 | | |
852 | 852 | | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
853 | 873 | | |
854 | 874 | | |
855 | 875 | | |
| |||
0 commit comments