LiteSun commented on code in PR #12036:
URL: https://github.com/apache/apisix/pull/12036#discussion_r2006697419


##########
apisix/plugins/ai-request-rewrite.lua:
##########
@@ -200,12 +200,8 @@ function _M.access(conf, ctx)
 
     -- Handle LLM response
     if res.status > 299 then
-        core.log.error("LLM service returned error status: ", res.status, ", 
err: ", err)
-        local error_msg = "LLM service returned error status: " .. res.status
-        if err then
-            error_msg = error_msg .. ", err: " .. err
-        end
-        return HTTP_BAD_REQUEST, error_msg
+        core.log.error("LLM service returned error status: ", res.status, ", 
", resp_body)

Review Comment:
   > i think we need to remove `resp_body`, it is big
   
   Logging the response body would make it easier to identify issues. For 
example, a 400 error can occur for various reasons, and the returned message 
can help pinpoint the problem.



-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to