Closed jometho closed 1 year ago
@mmcfarland thanks for your efforts. I'll use one sortBy parameter meanwhile to proceed and roll out our product. Your support is highly appreciated.
Hi @jometho -- we've included the referenced fix in our latest release and your test case is now returning items. Thanks for the reproducible example!
When I do a stac search against the Planetary Computer stac api (https://planetarycomputer.microsoft.com/api/stac/v1) and get the ItemSearch, then trying to get the individual items from the paginated ItemSearch, oine of the pages throws an exception with the following error "code":"PostgresSyntaxError","description":"syntax error at or near \")\""
Wraping the loop like so does not catch the exception that seems to come from stac_utils. try: for item in items: results.append(compose_results(item, geojson_aoi)) except:
Consequently, we loose all the items in this Item Search, is an improvement that could be done to gracefully handle these errors. I suspect the problem is while getting the paginated items one of the queries parses a bad character to Postgres on Planetary server side and hence the error. But I'm out of options on how to handle it and continue with the remaining good results.
Sample code to reproduce
Will throw an error os this sort