File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
stac_fastapi/elasticsearch/stac_fastapi/elasticsearch Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,8 @@ async def item_collection(
105
105
collection = await self .get_collection (
106
106
collection_id = collection_id , request = request
107
107
)
108
- try :
109
- collection_id = collection ["id" ]
110
- except Exception :
108
+ collection_id = collection .get ("id" )
109
+ if collection_id is None :
111
110
raise HTTPException (status_code = 404 , detail = "Collection not found" )
112
111
113
112
search = self .database .make_search ()
@@ -313,9 +312,9 @@ async def post_search(
313
312
cql2_filter = getattr (search_request , "filter" , None )
314
313
try :
315
314
search = self .database .apply_cql2_filter (search , cql2_filter )
316
- except Exception :
315
+ except Exception as e :
317
316
raise HTTPException (
318
- status_code = 400 , detail = "Error with cql2_json filter"
317
+ status_code = 400 , detail = f "Error with cql2_json filter: { e } "
319
318
)
320
319
321
320
sort = None
You can’t perform that action at this time.
0 commit comments