monkeyDluffy6017 commented on code in PR #9289:
URL: https://github.com/apache/apisix/pull/9289#discussion_r1166228488
##########
apisix/plugins/batch-requests.lua:
##########
@@ -275,7 +275,14 @@ local function batch_requests(ctx)
headers = resp.headers,
}
if resp.has_body then
- sub_resp.body = resp:read_body()
+ local err
+ sub_resp.body, err = resp:read_body()
+ if err then
+ sub_resp.read_body_err = err
+ core.log.error("read_body: ", err)
Review Comment:
core.log.error("read pipiline response body failed: ", err)
##########
apisix/plugins/batch-requests.lua:
##########
@@ -275,7 +275,14 @@ local function batch_requests(ctx)
headers = resp.headers,
}
if resp.has_body then
- sub_resp.body = resp:read_body()
+ local err
+ sub_resp.body, err = resp:read_body()
+ if err then
+ sub_resp.read_body_err = err
+ core.log.error("read_body: ", err)
+ elseif resp.read_trailers then
Review Comment:
Why check `resp.read_trailers` here?
The `read_trailers` must exist
--
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]