Skip to content

Commit

Permalink
fix decode error audit middleware (#2520)
Browse files Browse the repository at this point in the history
  • Loading branch information
drf7 authored Oct 8, 2024
1 parent 7595a2d commit d11a7ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nucliadb_utils/src/nucliadb_utils/audit/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint) -

if request.url.path.split("/")[-1] in ("ask", "search", "find"):
if request.method == "POST":
body = (await request.body()).decode()
body = (await request.body()).decode(errors="replace")
context.audit_request.user_request = body
elif request.method == "GET":
query_params = json.dumps(dict(request.query_params))
Expand Down

0 comments on commit d11a7ba

Please sign in to comment.