Andrushika commented on code in PR #72683:
URL: https://github.com/apache/airflow/pull/72683#discussion_r3960530574
##########
airflow-core/src/airflow/api_fastapi/logging/decorators.py:
##########
@@ -203,8 +203,11 @@ async def log_action(
masked_body_json = {}
if has_json_body:
- request_body = await request.json()
- if isinstance(request_body, dict):
+ # ``request_body`` stays empty unless the body parses to a dict,
so the ``.items()``
+ # calls below never see a list or a bare string. The endpoint
rejects those with 422.
Review Comment:
Nit: I think this comment mostly restates what the next few lines do. Maybe
shorten it to one line on the "why", or just drop it?
```suggestion
# Non-dict bodies fall through to the endpoint's own 422.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]