Hi, I have a question and would like to confirm a few details about implementing shadowing in Krakend.
Currently, I am implementing shadowing for specific endpoints in my configuration. Most of my endpoints use the no-op encoding, but I noticed that I cannot use it when implementing shadowing. For now, shadowing works well in the "happy case" scenarios for the designated endpoints.
After deploying this setup to production, we encountered an issue: the behavior of the return status codes and response bodies is different between no-op and json encodings during error scenarios. Specifically, when clients send an invalid payload, they do not receive a proper response body (status code and message) when no-op is used.
I reviewed the documentation and reproduced the issue in my local environment using Docker Compose. I managed to fix the issue locally by applying the following global router configuration:
- Works as expected in local
While the fix works in the local environment, I’m a bit concerned about applying this change in production, as it affects the global router configuration. Specifically, I want to ensure that this update will not inadvertently affect other endpoints in my gateway, as I am only implementing shadowing for a single endpoint.
Anyone can confirm whether this change is isolated to shadowing-related endpoints or if it might impact other routes as well? - if there are some docs, can also share, currently i cannot find any.
Thank you for your assistance. I appreciate any insights and help !!