Skip to content

Commit 7a4e984

Browse files
committed
fix: handle empty search body
1 parent 4121ba8 commit 7a4e984

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stac_auth_proxy/middleware/ApplyCql2FilterMiddleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
8989

9090
# Modify body
9191
try:
92-
body = json.loads(body)
92+
body = json.loads(body) if body else {}
9393
except json.JSONDecodeError as e:
9494
logger.warning("Failed to parse request body as JSON")
9595
# TODO: Return a 400 error

0 commit comments

Comments
 (0)