hanzhenfang commented on issue #13501:
URL: https://github.com/apache/apisix/issues/13501#issuecomment-4705670889
Hi, @Baoyuantop ,I think the key branch is in
`apisix/plugins/ai-proxy/base.lua`: after
`transport_http.request()` returns, `ai-proxy` handles retryable responses
with
an early return:
```lua
if res.status == 429 or (res.status >= 500 and res.status < 600) then
if res._httpc then
res._httpc:close()
end
return res.status
end
```
That happens before `ai_provider:parse_response(...)`, so `res.body_reader`
is
never consumed for 429/5xx. As a result, the upstream JSON error payload
cannot
be returned to the client or captured by the normal response/logging path.
--
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]