Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apisix/plugins/ai-proxy/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ function _M.before_proxy(conf, ctx, on_error)
if res._httpc then
res._httpc:close()
end
core.log.warn("upstream AI service returned status: ", res.status,
", body: ", error_body or "")
return res.status, error_body
end

Expand Down
2 changes: 2 additions & 0 deletions t/plugin/ai-proxy.t
Original file line number Diff line number Diff line change
Expand Up @@ -1325,5 +1325,7 @@ POST /anything
{ "messages": [ { "role": "user", "content": "What is 1+1?"} ] }
--- error_code: 500
--- response_body_like: upstream boom
--- error_log
upstream AI service returned status: 500
--- response_headers
Content-Type: application/json
Loading