CS-SI / eodag

Earth Observation Data Access Gateway
https://eodag.readthedocs.io
Apache License 2.0
324 stars 44 forks source link

check dates validity before search #964

Open arpitdeomurari opened 10 months ago

arpitdeomurari commented 10 months ago

Hi Team,

I'm trying to download S2_MSI_L1C data from PEPS. It was working perfectly from eodag (Python program to download S2 images), but suddenly it started giving an Internal Error 500.

Query string: https://peps.cnes.fr/resto/api/collections/S2ST/search.json?startDate=2020-01-01&completionDate=2023-11-31&geometry=MULTIPOLYGON (((75.1998 12.4642, 75.8102 12.4630, 75.8080 11.8702, 75.1998 11.8712, 75.1998 12.4642)))&productType=S2MSI1C&maxRecords=500&page=1

Response String: 500 Server Error: Internal Server Error for url: https://peps.cnes.fr/resto/api/collections/S2ST/search.json?startDate=2020-01-01&completionDate=2023-11-31&geometry=MULTIPOLYGON%20(((75.1998%2012.4642,%2075.8102%2012.4630,%2075.8080%2011.8702,%2075.1998%2011.8712,%2075.1998%2012.4642)))&productType=S2MSI1C&maxRecords=500&page=1

sbrunato commented 10 months ago

Hello @arpitdeomurari , this error 500 is raised by peps because the provider cannot handle the given end date: 2023-11-31 that does not exist. The message sent by peps is not very explicit. One thing we could do on eodag side, would be to check dates validity before sending the request to the provider