Skip to content

Commit 5c5c856

Browse files
committed
fix: properly return error on invalid CQL2 filters
1 parent c0d5a27 commit 5c5c856

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stac_auth_proxy/middleware/Cql2BuildFilterMiddleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
9393
cql2_filter.validate()
9494
except ValidationError:
9595
logger.error("Invalid CQL2 filter: %s", filter_expr)
96-
return await Response(status_code=502, content="Invalid CQL2 filter")
96+
return Response(status_code=502, content="Invalid CQL2 filter")
9797
setattr(request.state, self.state_key, cql2_filter)
9898

9999
return await self.app(scope, receive, send)

0 commit comments

Comments
 (0)