Hello
We have an application which throws custom error codes instead of standard HTTP Error codes(500,4xx). All the request go to this application via an HAproxy . Is there a way we can capture the response xml body, look for that custom error code and write to logs?
Any help is appreciated on this matter.
Not with internal functionality of haproxy.
There may be a way with LUA, and you can read more about this here:
https://www.arpalert.org/haproxy-lua.html
But that means you need to invest some time into this, there are no solutions ready for deployment as far as I can tell.