membphis commented on PR #13380:
URL: https://github.com/apache/apisix/pull/13380#issuecomment-4516287028

   `get_metadata` currently skips customization whenever 
`ctx.var.upstream_status` is set, but `$upstream_status` can also be set for 
NGINX proxy-layer failures such as connection refused or upstream timeout. 
Those are not real upstream application responses.
   
   As a result, `error-page` will miss common gateway-generated 502/503 
responses, even though the PR description explicitly lists “upstream is 
unreachable” as a supported scenario.
   
   Could we use `core.response.get_response_source(ctx)` here and only skip 
when the source is `"upstream"`? This would still avoid rewriting real upstream 
responses, while allowing APISIX/NGINX-generated errors to be customized. 
Please also add a 502/503 test with an unreachable or timeout upstream.


-- 
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]

Reply via email to