You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the the desired behavior, what scenario it enables and how it
would be used.
A microservice in the istio service mesh causes a 4xx or 5xx error, instead of just returning the status code to the browser. We have a microservice that renders a nice custom error page. We want to modify the response body to be this nicely rendered custom error page.
nginx has this functionaly, it would be great if envoy had it also.
[optional Relevant Links:]
Any extra documentation required to understand the issue.
here is the snippet of lua code inside the envoy_on_response function that I am trying to use:
-- This section of code is for redirecting to maintenance if a 4xx or 5xx status code is detected
if headerStatus ~= nil then
if string.match(headerStatus, '[4-5].*') and headerStatus ~= "401" then
response_headers, response_body = response_handle:httpCall(
"outbound|80||maintenance.ondeck.svc.cluster.local",
{
[":method"] = "GET",
[":path"] = "/maintenance/"..headerStatus,
[":authority"] = "maintenance.ondeck.svc.cluster.local"
},
"",
1000
)
response_handle:respond(
{[":status"] = "200",
["envoy-fallback"] = "true"},
response_body)
end
end
i get the following error:
[istio-ingressgateway-78bcc4574c-9pwmx] 2020-09-03T19:21:21.223613Z error envoy lua [external/envoy/source/extensions/filters/http/lua/lua_filter.cc:685] script log: [string "function encodeChar(chr)..."]:112: respond not currently supported in the response path
The text was updated successfully, but these errors were encountered:
Title: One line description
Description:
A microservice in the istio service mesh causes a 4xx or 5xx error, instead of just returning the status code to the browser. We have a microservice that renders a nice custom error page. We want to modify the response body to be this nicely rendered custom error page.
nginx has this functionaly, it would be great if envoy had it also.
[optional Relevant Links:]
i get the following error:
[istio-ingressgateway-78bcc4574c-9pwmx] 2020-09-03T19:21:21.223613Z error envoy lua [external/envoy/source/extensions/filters/http/lua/lua_filter.cc:685] script log: [string "function encodeChar(chr)..."]:112: respond not currently supported in the response path
The text was updated successfully, but these errors were encountered: