externally, my proxy returns 502 (upstream gone away)
my proxy talks to my service which returns 400 (client error)
the router layer returns 499 (client closed request)
what is happening is that the external caller is dropping the connection while the "my service" is preparing a result to go back on the connection
to "my proxy". This means that the socket drops from the "my proxy" side.
The router at the my service side logs a 499 and so the app logs a 400
There is nothing wrong with your code. The external clients using your web service are dropping their connections early and this is how the application responds in logs